SublimeTextの設定(自分用メモ)

SublimeTextの設定メモ.

[
	{ "keys": ["ctrl+v"], "command": "move", "args": {"by": "pages", "forward": true}},
	{ "keys": ["ctrl+t"], "command": "move", "args": {"by": "pages", "forward": false}},	
	{"keys": ["ctrl+l"], "command": "run_macro_file", "args": {"file": "Packages/User/down5.sublime-macro"}},
	{"keys": ["ctrl+o"], "command": "run_macro_file", "args": {"file": "Packages/User/up5.sublime-macro"}},
	{ "keys": ["ctrl+shift+p"], "command": "move", "args": {"by": "lines", "forward": false, "extend":true}},
    // 選択しつつ下にカーソル移動
    { "keys": ["ctrl+shift+n"], "command": "move", "args": {"by": "lines", "forward": true, "extend":true}},
    // 選択しつつ右にカーソル移動
    { "keys": ["ctrl+shift+f"], "command": "move", "args": {"by": "characters", "forward": true, "extend":true}},
    // 選択しつつ左にカーソル移動
    { "keys": ["ctrl+shift+b"], "command": "move", "args": {"by": "characters", "forward": false, "extend":true}},
    // 検索パネルを表示
    { "keys": ["ctrl+s"], "command": "show_panel", "args": {"panel": "find"} },
    // 次を検索
    { "keys": ["ctrl+s"], "command": "find_under", "args": {"panel": "find"},	
    "context":
      [
        { "key": "panel_visible", "operator": "equal", "operand": true }
      ]
    },
    { "keys": ["ctrl+super+m"], "command": "markdown_preview", "args": {"target": "browser"} }
]

down5とup5はマクロファイルなので,5行移動をマクロにして保存する.
[ctrl+super+m]はマークダウンをプレビューするmarkdown previewのショートカット.

—————-

SublimeTextのショートカットで[tab]が使えない問題.

mkdir ~/Library/Application Support/Sublime Text 3/Packages/Default

して,SublimeTextを開いてPreference->KeyBingsのDefaultの方でcommand+sする.保存できたら

emacs ~/Library/Application Support/Sublime Text 3/Packages/Default/Default\ \(OSX\).sublime-keymap

を編集して100行目あたりの

 97    { "keys": ["super+]"], "command": "indent" },
 98    { "keys": ["super+["], "command": "unindent" },
 99
100//  { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
101//  { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
102//      "context":
103//      [
104//          { "key": "setting.tab_completion", "operator": "equal", "operand": true },
105//          { "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
106//      ]
107//  },
108    { "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
109        [
110            { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
111            { "key": "setting.tab_completion", "operator": "equal", "operand": true }
112        ]
113    },

こんな感じにコメントアウト.