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
;; alignのルールを追加(init.elに追加する) | |
;; SOURCE: http://handlename.hatenablog.jp/entry/2011/12/11/214923 | |
(eval-after-load "align" | |
'(add-to-list 'align-rules-list | |
'(my-comma-assignment | |
(regexp . ",\\(\\s-*\\)") | |
(repeat . t) | |
(modes . align-c++-modes)))) |
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
(defun my-align (&optional beg end) | |
"リージョンが有効ならその範囲を整列\nそうでないならポイント位置の段落を整列" | |
(interactive "r") | |
(if mark-active | |
(align beg end) | |
(align-current))) |
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
(defun my-indent (&optional beg end) | |
"リージョンが有効ならその範囲をインデント\nそうでないなら関数内をインデント" | |
(interactive "r") | |
(if mark-active | |
(indent-region beg end) | |
(save-excursion | |
(mark-defun) | |
(indent-region (region-beginning) (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
(defun my-indent (&optional beg end) | |
"リージョンが有効ならその範囲をインデント\nそうでないなら関数内をインデント" | |
(interactive "r") | |
(if mark-active | |
(indent-region beg end) | |
(save-excursion | |
(mark-defun) | |
(indent-region (region-beginning) (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
(defun my-indent (&optional beg end) | |
"リージョンが有効ならその範囲をインデント\nそうでないなら関数内をインデント" | |
(interactive "r") | |
(if mark-active | |
(indent-region beg end) | |
(save-excursion | |
(mark-defun) | |
(indent-region (region-beginning) (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
(defun my-indent (&optional beg end) | |
"リージョンが有効ならその範囲をインデント\nそうでないなら関数内をインデント" | |
(interactive "r") | |
(if mark-active | |
(indent-region beg end) | |
(save-excursion | |
(mark-defun) | |
(indent-region (region-beginning) (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
(font-lock-add-keywords 'dired-mode | |
'((" +-[rw-]+x" | |
(".+" (dired-move-to-filename) | |
nil | |
(0 'font-lock-string-face))))) |
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
;; キーワード挿入 | |
(setq my-keywords | |
'( | |
;; ここにキーワードとショートカットキーを列挙する | |
("TODO" "C-x c 1") | |
("FIXME" "C-x c 2") | |
("TIPS" "C-x c 3") | |
("SOURCE" "C-x c 4") | |
("NOTICE" "C-x c 5") | |
)) |
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
;; FIXME:git grepが日本語を含むパスを検索できないのためのwork around | |
;; 外部コマンド実行時にcdで検索パスを決めるようにした | |
(defun dumb-jump-generate-git-grep-command (look-for cur-file proj regexes lang exclude-paths) | |
"Generate the git grep response based on the needle LOOK-FOR in the directory PROJ." | |
(let* ((filled-regexes (dumb-jump-populate-regexes look-for regexes 'git-grep)) | |
(ggtypes (when (f-ext cur-file) (dumb-jump-get-git-grep-type-by-language lang))) | |
(cmd (concat "cd " | |
proj | |
";" | |
dumb-jump-git-grep-cmd |
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
;; 構文の間違いlispを警告するfont-lockを無効にする | |
(defadvice lisp--match-hidden-arg (around lisp--match-hidden-arg-wrapper) | |
(if (not (and (boundp 'use-my-lisp--match-hidden-arg) 'use-my-lisp--match-hidden-arg)) | |
ad-do-it)) | |
(ad-activate 'lisp--match-hidden-arg) | |
;; scratch buffer の hook | |
(defun lisp-interaction-mode-hooks() | |
(set (make-local-variable 'use-my-lisp--match-hidden-arg) t)) | |
(add-hook 'lisp-interaction-mode-hook 'lisp-interaction-mode-hooks) |