2009-06 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
2009-06-11 (木)
■ C-u bs-show <-> bs-show [Emacs]
[2009-06-07-4] のその後。
デフォルト C-u 付きの動作にしたかったので、以下の設定をした。
自分はこっちの方が合うかも。
;; M-x bs-show と C-u M-x bs-show の動作を交換する。 (setq bs-default-configuration "all") (setq bs-alternative-configuration "files")
■ キーバインド [Emacs]
kbd() を使って、~/.emacs を書き換えました。kbd() は anything.el で
使われていたのですが、こちらの方が今までの書き方より統一感が出るの
で、採用させていただきました。
修正前はこんな感じ。
(define-key esc-map "b" 'backward-sexp) (define-key global-map "\C-t" 'call-last-kbd-macro) (define-key global-map [(control \,)] 'backward-word) (define-key global-map [(control \.)] 'forward-word) (define-key ctl-q-map [?\C-\ ] 'comint-dynamic-complete-filename)
kbd() を使ったら統一感がでました。
(define-key esc-map (kbd "b") 'backward-sexp) (define-key global-map (kbd "C-t") 'call-last-kbd-macro) (define-key global-map (kbd "C-,") 'backward-word) (define-key global-map (kbd "C-.") 'forward-word) (define-key ctl-q-map (kbd "C-SPC") 'comint-dynamic-complete-filename)
※ ctl-q-map は自作のキーマップなので、デフォルトでは存在しません。
(kbd "ほげ") の ほげ の部分は、"F1 c" した後、調べたいキーを押すと
分かります。以下は Ctrl-f を調べた場合です。(kbd "C-f") と書けば良
いのだと分かりますね。
C-f runs the command forward-char
Emacs のキーバインドと、キー動作について、某所でまとめ中です。
まとめ終わったら、ここにもアップする予定です。
ちなみに、kbd() が定義されている subr.el には、lambda, when,
unless, caar など馴染みのある関数やマクロが定義されています。
とても興味深いですね!
2009-06 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
最終更新時間: 2010-07-27 06:00


