LoginSignup
0
0

More than 5 years have passed since last update.

Ubuntu環境のSublime text 3 でTab補完の無効化

Posted at
Tabキーがなにかと邪魔なので,オートコンプリートの選択にはenterを使い,TabキーにはTabの挿入だけをしてもらいます.
  • ~.config/sublime-text-3/Packages/ 以下に新しいフォルダ Default を作成

  • sublime text 3 を起動し Preferences -> Key Bindings を選択しデフォルトのキーマップファイルの内容をすべてコピーする

  • 新しいファイルを開きコピーした内容をすべて貼り付け, Default (Linux).sublime-keymap の名前でDefaultフォルダに保存する

  • 新しく作成した Default (Linux).sublime-keymap 以下の部分をコメントアウトもしくは削除する

    { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
    { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
        "context":
        [
            { "key": "setting.tab_completion", "operator": "equal", "operand": true },
            { "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
        ]
    },
    { "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
        [
            { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
            { "key": "setting.tab_completion", "operator": "equal", "operand": true }
        ]
    },
  • このままでは通常のタブ入力ができないので以下の部分を ["shift+tab"] から ["tab"] に変更する
    { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },

完了です.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0