修改sublime快捷键与eclipse一样

sublime的快捷键配置位于类似

D:\Program Files (x86)\Sublime Text 3\Data\Packages\User  这样的目录下,而默认的快捷键与eclipse不同,可以通过自定义快捷键来改成和eclipse一样的方式。

在目录下新建一个文件Default (Windows).sublime-keymap,内容如下

[{"keys": ["alt+up"], "command": "swap_line_up" },
{"keys": ["alt+down"], "command": "swap_line_down"} ,
{"keys": ["ctrl+alt+up"], "command": "duplicate_line"},
{"keys": ["ctrl+alt+down"], "command": "duplicate_line"},
{"keys": ["ctrl+shift+x"], "command": "upper_case"} ,
{"keys": ["ctrl+shift+y"], "command": "lower_case"} ,
{"keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"}},
{"keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"}}  
]

常用的和eclipse就保持一致了。


另外sublime的其他配置保存在相同目录的Preferences.sublime-settings文件中,可以新建一个此名字的文件,保存如下内容

{
"color_scheme": "Packages/Color Scheme - Default/Slush & Poppies.tmTheme",
"font_size": 17,
"tab_size": 2
}


你可能感兴趣的:(修改sublime快捷键与eclipse一样)