Help us understand the problem. What is going on with this article?

Sublime Text でEmacs的なキーバインドを設定する

More than 5 years have passed since last update.

Sublime Text でEmacs 的なキーバインドを設定する

  • 下記を開く

    • Preferences > Key Bindings- User
  • 下記の通り設定

json
[
    // 右移動(Ctrl + F)
    { "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true } },
    // 左移動(Ctrl + D)
    { "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false } },
    // 上移動(Ctrl + P)
    { "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false } },
    // 下移動(Ctrl + N)
    { "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true } },
    // 左削除(Ctrl + H)
    { "keys": ["ctrl+h"], "command": "left_delete" },
    // 右削除(Ctrl + D)
    { "keys": ["ctrl+d"], "command": "right_delete" },
    // 行の先頭へ移動(Ctrl + A)
    { "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
    // 行の末尾へ移動(Ctrl + E)
    { "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },


    // 上記の設定のせいで上書きされたコマンドを、Ctrl+Shift で復活させる 
    // 全選択(Ctrl + Shift + A)
    { "keys": ["ctrl+shift+a"], "command": "select_all" },
    // 同じ文字を一括選択・一括編集(Ctrl + Shift + D)
    { "keys": ["ctrl+shift+d"], "command": "find_under_expand" },
    // 選択行のコピー(Ctrl + Shift + V)
    { "keys": ["ctrl+shift+v"], "command": "duplicate_line" },
    // 検索(Ctrl + Shift + F)
    { "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
    // 新規タブ(Ctrl + Shift N)
    { "keys": ["ctrl+shift+n"], "command": "new_file" },

]


  • 一部の設定はSublimeTextの再起動を行わないと反映されないかも
  • 個人的に必要なコマンドは Ctrl + ~ で上書きしちゃったショートカットは Ctrl + Shift + ~ で復活させてるイメージ

  • 下記、デフォルトのキーバインドを参考にすれば結構簡単に設定できる

    • Preferences > Key Bindings- Default
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away