Sublime Text 2 に、 EmacsKillRing パッケージをインストール
Sublime Text 2 にて、 emacs キーバインドを使おうと思い Sublemacspro をインストールしたが、 Ctrl+k の挙動が少し emacs と異なっていた。Ctrl+k は一行分しかバッファにたまらない模様。
そこで、EmacsKillRing パッケージをインストールして、Ctrl+k の挙動を emacs と同じにするようにした。
- https://github.com/stiang/EmacsKillRing より、EmacsKillRing.py をダウンロード
- C:\Users\<ユーザ名>\AppData\Roaming\Sublime Text 2\Packages\User 以下に、EmacsKillRing.py を配置
- C:\Users\<ユーザ名>\AppData\Roaming\Sublime Text 2\Packages\User\Default (Windows).sublime-keymap にて、以下を挿入
// EmacsKillRing // https://github.com/stiang/EmacsKillRing {"keys": ["ctrl+w"], "command": "expand_selection", "args": {"to": "word"} }, {"keys": ["ctrl+k"], "command": "emacs_kill_line" }, {"keys": ["ctrl+y"], "command": "paste" }, {"keys": ["ctrl+space"], "command": "emacs_set_mark" }, {"keys": ["ctrl+w"], "command": "emacs_kill_to_mark" }, {"keys": ["alt+w"], "command": "emacs_kill_ring_save" }, //ctrl + g で、コマンドのキャンセルが効かなくなるため、以下はコメントアウト //{"keys": ["ctrl+g"], "command": "cancel_mark" }