Changeset 289
- Timestamp:
- 09/27/07 19:27:24 (6 years ago)
- Location:
- dotfiles/emacs/kentaro
- Files:
-
- 3 added
- 1 removed
- 9 modified
-
.emacs (modified) (2 diffs)
-
.emacs.d/conf/init-abbrves.el (modified) (1 diff)
-
.emacs.d/conf/init-autosafe-buffers.el (deleted)
-
.emacs.d/conf/init-autosave-buffers.el (added)
-
.emacs.d/conf/init-dired.el (modified) (1 diff)
-
.emacs.d/conf/init-global.el (modified) (2 diffs)
-
.emacs.d/conf/init-highlighting.el (modified) (1 diff)
-
.emacs.d/conf/init-keymaps.el (modified) (1 diff)
-
.emacs.d/conf/init-languages.el (modified) (1 diff)
-
.emacs.d/conf/init-minibuf.el (modified) (2 diffs)
-
.emacs.d/conf/init-perl.el (modified) (3 diffs)
-
.emacs.d/conf/init-scheme.el (added)
-
.emacs.d/conf/init-w3m.el (added)
Legend:
- Unmodified
- Added
- Removed
-
dotfiles/emacs/kentaro/.emacs
r143 r289 66 66 (load "init-dired") 67 67 (load "init-sdic") 68 (load "init-w3m") 68 69 (load "init-languages") 69 70 (load "init-html") … … 74 75 (load "init-php") 75 76 (load "init-haskell") 77 (load "init-scheme") 76 78 (load "init-yaml") 77 79 -
dotfiles/emacs/kentaro/.emacs.d/conf/init-abbrves.el
r143 r289 3 3 ;; 動的略語展開 4 4 (define-key global-map "\C-u" 'dabbrev-expand) 5 ;; dabbrev時に、大文字・小文字を区別しない。 6 (setq dabbrev-case-fold-search nil) 7 ;; dabbrev時に、補完候補をハイライトする。 8 (require 'dabbrev-highlight) 9 ;; dabbrevをいろんな単語にマッチさせる 10 (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_\\|[:-_]") 5 11 6 12 ;; ac-mode -
dotfiles/emacs/kentaro/.emacs.d/conf/init-dired.el
r143 r289 1 1 ;; -*- Mode: Emacs-Lisp ; Coding: utf-8 -*- 2 3 ;; wdired 4 ;; http://www.bookshelf.jp/soft/meadow_25.html#SEC292 5 (require 'wdired) 6 ;; rでdiredバッファを直接編集できるようになる。 7 (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) 2 8 3 9 ;; lsの代りにEmacs自体の機能を利用してディレクトリをリスト -
dotfiles/emacs/kentaro/.emacs.d/conf/init-global.el
r143 r289 37 37 (setq make-backup-files nil) 38 38 39 ;; 自動保存したファイルを削除する。 40 (setq delete-auto-save-files t) 41 42 ;; 自動セーブしない。 43 (setq auto-save-default nil) 44 45 ;; yes/noを、y/nで選択できるようにする。 46 (fset 'yes-or-no-p 'y-or-n-p) 47 39 48 ;; kill-lineで行末の改行文字も削除 40 49 (setq kill-whole-line t) … … 68 77 )) 69 78 70 ;; ;マクロ読み込み79 ;; マクロ読み込み 71 80 (load "~/.emacs.d/conf/macros") 81 82 ;; 個人用infoディレクトリを追加 83 (setq Info-default-directory-list 84 (cons "~/.emacs.d/info/" Info-default-directory-list)) -
dotfiles/emacs/kentaro/.emacs.d/conf/init-highlighting.el
r143 r289 11 11 (autoload 'paren-activate "mic-paren" nil t) 12 12 (setq paren-match-face 'bold paren-sexp-mode t) 13 14 ;; hightlight-current-line 15 ;; http://www.emacswiki.org/cgi-bin/wiki/HighlightCurrentLine 16 (require 'highlight-current-line) 17 (highlight-current-line-on t) 18 (set-face-attribute 'highlight-current-line-face nil 19 :background "black" 20 :underline nil) 13 21 14 22 ;; リージョンをハイライト表示 -
dotfiles/emacs/kentaro/.emacs.d/conf/init-keymaps.el
r143 r289 6 6 ;; C-x?でヘルプ 7 7 (global-set-key "\C-x?" 'help) 8 9 ;; C-c C-iでインフォを引く 10 (define-key global-map "\C-c\C-i" 'info-lookup-symbol) 11 12 ;; C-aで、インデント文字を飛ばした行頭に戻る 13 ;; http://subtech.g.hatena.ne.jp/antipop/20070916/1189915386 14 (global-set-key "\C-a" 'beggining-of-indented-line) 15 (defun beggining-of-indented-line (current-point) 16 "インデント文字を飛ばした行頭に戻る。ただし、ポイントから行頭ま 17 での間にインデント文字しかない場合は、行頭に戻る。" 18 (interactive "d") 19 (if (string-match 20 "^[ \t]*$" 21 (save-excursion 22 (buffer-substring-no-properties 23 (progn (beginning-of-line) (point)) 24 current-point))) 25 (beginning-of-line) 26 (back-to-indentation))) -
dotfiles/emacs/kentaro/.emacs.d/conf/init-languages.el
r143 r289 17 17 (global-set-key "\C-c\C-f" 'find-tag) 18 18 (global-set-key "\C-c\C-b" 'pop-tag-mark) 19 20 ;; infoファイル置き場を追加 21 (setq Info-default-directory-list 22 (cons "~/.emacs.d/info" Info-default-directory-list)) 23 24 ;; リージョンを自動的に囲む 25 ;; http://sami.samhuri.net/2007/6/23/emacs-for-textmate-junkies 26 (defun wrap-region (left right beg end) 27 "Wrap the region in arbitrary text, LEFT goes to the left and RIGHT goes to the right." 28 (interactive) 29 (save-excursion 30 (goto-char beg) 31 (insert left) 32 (goto-char (+ end (length left))) 33 (insert right))) 34 35 (defmacro wrap-region-with-function (left right) 36 "Returns a function which, when called, will interactively `wrap-region-or-insert' using LEFT and RIGHT." 37 `(lambda () (interactive) 38 (wrap-region-or-insert ,left ,right))) 39 40 (defun wrap-region-with-tag-or-insert () 41 (interactive) 42 (if (and mark-active transient-mark-mode) 43 (call-interactively 'wrap-region-with-tag) 44 (insert "<"))) 45 46 (defun wrap-region-with-tag (tag beg end) 47 "Wrap the region in the given HTML/XML tag using `wrap-region'. If any 48 attributes are specified then they are only included in the opening tag." 49 (interactive "*sTag (including attributes): \nr") 50 (let* ((elems (split-string tag " ")) 51 (tag-name (car elems)) 52 (right (concat "</" tag-name ">"))) 53 (if (= 1 (length elems)) 54 (wrap-region (concat "<" tag-name ">") right beg end) 55 (wrap-region (concat "<" tag ">") right beg end)))) 56 57 (defun wrap-region-or-insert (left right) 58 "Wrap the region with `wrap-region' if an active region is marked, otherwise insert LEFT at point." 59 (interactive) 60 (if (and mark-active transient-mark-mode) 61 (wrap-region left right (region-beginning) (region-end)) 62 (insert left))) 63 64 (global-set-key "'" (wrap-region-with-function "'" "'")) 65 (global-set-key "\"" (wrap-region-with-function "\"" "\"")) 66 (global-set-key "`" (wrap-region-with-function "`" "`")) 67 (global-set-key "(" (wrap-region-with-function "(" ")")) 68 (global-set-key "[" (wrap-region-with-function "[" "]")) 69 (global-set-key "{" (wrap-region-with-function "{" "}")) 70 (global-set-key "<" 'wrap-region-with-tag-or-insert) -
dotfiles/emacs/kentaro/.emacs.d/conf/init-minibuf.el
r143 r289 12 12 (setq read-file-name-completion-ignore-case t) 13 13 14 ;; pointがある箇所のファイルを開く 15 (ffap-bindings) 16 14 17 ;; バッファの選択候補をインクリメンタルにしぼる 15 18 ;; http://www.fan.gr.jp/~ring/Meadow/meadow.html#iswitchb.el 16 19 (require 'iswitchb) 17 20 (iswitchb-default-keybindings) 21 22 ;; iswitchbで補完対象に含めないバッファ 23 (setq iswitchb-buffer-ignore 24 '( 25 "^ " 26 "*Messages*" 27 "*Buffer*" 28 "*PerlModules*" 29 "Completions" 30 )) 18 31 19 32 ;; ミニバッファ内の入力を、インクリメンタルに選択 … … 46 59 (require 'uniquify) 47 60 (setq uniquify-buffer-name-style 'post-forward-angle-brackets) 61 62 ;; anything - find-file, bookmark, buffer操作等、なんでもいっしょくたに 63 ;; http://d.hatena.ne.jp/rubikitch/20070725#1186048100 64 (require 'anything-config) 65 66 ;; anythingバッファ内での移動 67 (define-key anything-map "\C-p" 'anything-previous-line) 68 (define-key anything-map "\C-n" 'anything-next-line) 69 (define-key anything-map "\C-v" 'anything-next-page) 70 (define-key anything-map "\M-v" 'anything-previous-page) 71 72 ;; iswitchbとの連携 73 (anything-iswitchb-setup) -
dotfiles/emacs/kentaro/.emacs.d/conf/init-perl.el
r143 r289 1 1 2 ;; -*- Mode: Emacs-Lisp ; Coding: utf-8 -*- 2 3 … … 24 25 (set-face-background 'cperl-hash-face "black") 25 26 )) 27 28 ;; cperl-mode初回起動時に、モジュール名を全て詰め込んだバッファを作成し、 29 ;; dabbrevでモジュール名を補完できるようにする。 30 ;; http://subtech.g.hatena.ne.jp/antipop/20070917/1190009355 31 (add-hook 'cperl-mode-hook 32 (lambda () 33 (let ((buffer nil) (buffer-name "*PerlModules*")) 34 (unless (get-buffer buffer-name) 35 (setq buffer (generate-new-buffer buffer-name)) 36 (save-current-buffer 37 (shell-command 38 "find `perl -e 'print join(q{ }, @INC);'` -name '*.pm' -type f | xargs egrep -h -o 'package [a-zA-Z0-9:]+;' | perl -nle 's/package\s+(.+);/$1/; print' | sort | uniq" 39 buffer) 40 (set-buffer buffer) 41 (delete-window)))))) 42 43 ;; use文を、C-c C-mで自動挿入。 44 ;; http://subtech.g.hatena.ne.jp/antipop/20070917/1189962499 45 (add-hook 'cperl-mode-hook 46 (lambda () 47 (local-set-key (kbd "\C-c \C-m") 'perl-insert-use-statement))) 48 49 (defun perl-insert-use-statement (current-point) 50 "use statement auto-insertion." 51 (interactive "d") 52 (insert-use-statement 53 (detect-module-name current-point) 54 (detect-insert-point))) 55 56 (defun insert-use-statement (module-name insert-point) 57 (save-excursion 58 (goto-char insert-point) 59 (insert (concat "\nuse " module-name ";")))) 60 61 (defun detect-insert-point () 62 (save-excursion 63 (if (re-search-backward "use .+;" 1 t) 64 (match-end 0) 65 (progn 66 (string-match "^$" (buffer-string)) 67 (match-end 0))))) 68 69 (defun detect-module-name (current-point) 70 (let ((str (save-excursion 71 (buffer-substring 72 current-point 73 (progn (beginning-of-line) (point)))))) 74 (if (string-match "\\([[:alnum:]-_:]+\\)$" str) 75 (match-string 1 str) 76 (error "Module name not found")))) 26 77 27 78 ;; perly-sense … … 81 132 '(lambda() 82 133 (progn 83 (define-key cperl-mode-map "{" 'insert-braces)134 ; (define-key cperl-mode-map "{" 'insert-braces) 84 135 (define-key cperl-mode-map "(" 'insert-parens) 85 136 (define-key cperl-mode-map "\"" 'insert-double-quotation)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)