This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ------------------------------------------------------------ | |
;;; 次/前の空行 | |
;; gist-description: Emacs(Elisp): forward/backward-paragraphだとparagraph判定がおそらくシンタックステーブル依存になり、字義通りの「次の空行」にならないので、別途用意。 | |
;; gist-id: ad27b19dd3779ccc1ff2 | |
;; gist-name: move(region)-to-next(previous)-blank-line.el | |
;; gist-private: nil | |
(defun move-to-previous-blank-line () | |
"Go to previous empty lines." | |
(interactive "^") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; defadvice-indent-for-tab-command | |
;; gist-description: Emacs(Elisp): To integrate indent style, delete existing whitespaces before indent-for-tab-command. indent-for-tab-commandの前に存在する行頭ホワイトスペースを削除することでインデントスタイルを統一する | |
;; gist-id: 604173d11ff376036635fd4811df6abb | |
;; gist-name: defadvice-indent-for-tab-command.el | |
;; gist-private: nil | |
(defadvice indent-for-tab-command (around advise-indent-for-tab-command activate) | |
"To integrate indent style, delete existing whitespaces before indentation." | |
(let (beg | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ------------------------------------------------------------ | |
;;; 次/前のwordbreakへ | |
;; gist-description: Emacs(Elisp): forward/backward-wordだと、移動距離が微妙に大きいので、単語境界でひっかかるように。 | |
;; gist-id: 467f4302c002049bfb95511bd21cdbe7 | |
;; gist-name: move-to-next(previous)-word-break.el | |
;; gist-private: nil | |
;; thx http://d.hatena.ne.jp/h1mesuke/20070803/p1 | |
(defun move-to-next-word-break (&optional arg) | |
"Move point forward ARG word breaks (backward if ARG is negative)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ------------------------------------------------------------ | |
;;; 起動時には最後に作業していたファイルを開く | |
;; gist-description: Emacs(Elisp): Preserve last buffers and its each point to reopen. 終了時のバッファとポイントを記憶して、起動時に同じ状態で開くelispです。 | |
;; gist-id: 35b4d739a149f70e86298f71e5b1f9e7 | |
;; gist-name: preserve-last-buffers-and-point.el | |
;; gist-private: nil | |
(defvar my-hist-dir (expand-file-name "~/.emacs.d/histories/")) | |
(defvar my-hist-last-files (concat my-hist-dir "last-files")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ------------------------------------------------------------ | |
;;; やっぱりキル時にリージョンを残したい……。 | |
;; gist-description: Emacs(Elisp): Preserve region when kill. 他のエディタだと選択範囲を作った後コピーしても選択範囲が解除されないが、Emacsは解除されちゃう。1年以上使っていてもどうしてもこれには慣れることができなかったので、選択範囲をキープするように変更。 | |
;; gist-id: | |
;; gist-name: preserve-region-when-kill.el | |
;; gist-private: nil | |
(defun f--around--cua-copy-region (cua-copy-region arg) | |
"Keep Region at kill. CUA-COPY-REGION, ARG." | |
(let ((beg (region-beginning)) | |
(end (region-end))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ------------------------------------------------------------ | |
;;; 大きいファイルを早く開きたい | |
;; gist-description: Emacs(Elisp): Open large file quickly. 大きいファイルを早く開きたい | |
;; gist-id: 96e00bd843c838f45ab8183e286150ec | |
;; gist-name: open-large-file-quickly.el | |
;; gist-private: nil | |
(defun open-large-file-quickly() | |
"To read large file." | |
(interactive) | |
(progn |
OlderNewer