tata色々な備忘録

データ解析、画像解析、化学分析などなど

Sublime text2でコード補完をtab選択し、Enterで決定

Sublime text2のコード補完デフォルトが十字キーで使い辛い。

Tabで選択+Enterで決定するための設定を行う。

方法

Preferenceのキーバインド⇒ユーザーにて、下記の項目を追記

 { "keys": ["tab"], "command": "auto_complete", "context":
  [
   { "key": "auto_complete_visible", "operator": "equal", "operand": true }
  ]
 },
 { "keys": ["shift+tab"], "command": "auto_complete_prev", "context":
  [
   { "key": "auto_complete_visible", "operator": "equal", "operand": true }
  ]
 },
  { "keys": ["enter"], "command": "commit_completion", "context":
        [
            { "key": "auto_complete_visible" },
            { "key": "setting.auto_complete_commit_on_tab", "operand": true}
        ]
  }

Shift+Tabで一つ戻る。

……重くなったような。

参考

http://makev.blogspot.jp/2012/11/sublimetext2tab.html