{
// "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", 和默认设置一样
"default_line_ending": "unix", // 每行后是一个换行符
"fade_fold_buttons": false,
"word_wrap": false,
"font_face": "monaco", // 改变字体类型
"highlight_modified_tabs": true, // 修改文件时标签变橘黄色
"reparse_use_dirty_buffer": true,
"color": "entity.name.class",
"font_size": 22.0,
"highligeh_line": true, // 高亮当前行
"ignored_packages":
[
"Vintage" // 忽略vin设置
],
"rulers": // 80列提醒
[
80
],
"tab_size": 2, // tab缩进2格
"translate_tabs_to_spaces": true, // 空格代替tab
"trim_trailing_white_space_on_save": true // 保存文件是删去结束空格
}
// key binding user
[
// 移动光标
{ "keys": ["command+j"], "command": "move","args": {"by": "characters", "forward":false} },
// 光标前移
{ "keys": ["command+;"], "command": "move","args": {"by": "characters", "forward":true} },
// 光标后移
{ "keys": ["command+k"], "command": "move","args": {"by": "lines", "forward":false} },
// 光标上移
{ "keys": ["command+l"], "command": "move","args": {"by": "lines", "forward":true} },
// 光标下移
// 移动光标到行末,行首
{ "keys": ["shift+command+j"], "command":"move_to", "args": {"to": "bol", "extend": false}},
// 光标移到行首
{ "keys": ["shift+command+;"], "command":"move_to", "args": {"to": "eol", "extend": false}},
// 光标移到行尾
// 滚屏
{ "keys": ["command+u"], "command":"scroll_lines", "args": {"amount": 1.0}},
// 上滚屏
{ "keys": ["command+i"], "command":"scroll_lines", "args": {"amount": -1.0}},
// 下滚屏
{ "keys": ["shift+command+'"], "command":"move_to", "args": {"to": "bol", "extend": false}},
{ "keys": ["command+'"], "command":"move_to", "args": {"to": "bol", "extend": false}},
// 取消快捷键
{ "keys": ["super+m"], "command": "fold" },
{ "keys": ["super+shift+m"], "command": "unfold" },
// 代码折叠
{ "keys": ["super+shift+1"], "command": "fold_by_level", "args": {"level": 1} },
{ "keys": ["super+shift+2"], "command": "fold_by_level", "args": {"level": 2} },
{ "keys": ["super+shift+3"], "command": "fold_by_level", "args": {"level": 3} },
{ "keys": ["super+shift+4"], "command": "fold_by_level", "args": {"level": 4} },
{ "keys": ["super+shift+5"], "command": "fold_by_level", "args": {"level": 5} },
{ "keys": ["super+shift+6"], "command": "fold_by_level", "args": {"level": 6} },
{ "keys": ["super+shift+7"], "command": "fold_by_level", "args": {"level": 7} },
{ "keys": ["super+shift+8"], "command": "fold_by_level", "args": {"level": 8} },
{ "keys": ["super+shift+9"], "command": "fold_by_level", "args": {"level": 9} },
{ "keys": ["command+control+enter"], "command": "open_in_browser"},
// 默认浏览器打开
{ "keys": ["super+alt+j"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["super+alt+;"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
// 行内选中
{"keys": ["super+shift+\\"], "command": "alignment"}
]
[
// 光标前移
{ "keys": ["ctrl+j"], "command": "move","args": {"by": "characters", "forward":false} },
// 光标后移
{ "keys": ["ctrl+;"], "command": "move","args": {"by": "characters", "forward":true} },
// 光标上移
{ "keys": ["ctrl+k"], "command": "move","args": {"by": "lines", "forward":false} },
// 光标下移
{ "keys": ["ctrl+l"], "command": "move","args": {"by": "lines", "forward":true} },
// 光标移到行首
{ "keys": ["ctrl+alt+j"], "command":"move_to", "args": {"to": "bol", "extend": false}},
// 光标移到行尾
{ "keys": ["ctrl+alt+;"], "command":"move_to", "args": {"to": "eol", "extend": false}},
// 上滚屏
{ "keys": ["ctrl+u"], "command":"scroll_lines", "args": {"amount": 1.0}},
// 下滚屏
{ "keys": ["ctrl+i"], "command":"scroll_lines", "args": {"amount": -1.0}},
// 行内选中
{ "keys": ["shift+ctrl+j"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["shift+ctrl+;"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
{ "keys": ["shift+ctrl+k"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["shift+ctrl+l"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
]
monaco是苹果的字体,Ubuntu下没有。
git clone https://github.com/cstrap/monaco-font
cd monaco-font
sudo ./install-font-ubuntu.sh https://github.com/todylu/monaco.ttf/blob/master/monaco.ttf?raw=true
monaco-font里有README,里面写了对于CentOS和Gentoo系统的安装方法。和REDME不同的是 http://usystem.googlecode.com/files/MONACO.TTF 过期了,所以改用https://github.com/todylu/monaco.ttf/blob/master/monaco.ttf?raw=true这个地址