自定义Sublime Text快捷键为Eclipse快捷键

Posted szs00szs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义Sublime Text快捷键为Eclipse快捷键相关的知识,希望对你有一定的参考价值。

Preferences -> Key bindings - User 

*注意:是 Key bindings - User 

如果部分失效请检查是否与其它软件快捷键冲突,如ctrl+shift+f和输入法快捷键!

[  
  "keys": ["shift+enter"], "command": "run_macro_file", "args": "file": "Packages/Default/Add Line.sublime-macro" ,  
  "keys": ["alt+/"], "command": "auto_complete" ,//自动提示
  "keys": ["alt+up"], "command": "swap_line_up" ,//整行上移
  "keys": ["alt+down"], "command": "swap_line_down" ,//整行下移
  "keys": ["alt+left"], "command": "jump_back" ,//跳转到上一个编辑处
  "keys": ["alt+right"], "command": "jump_forward" ,
  "keys": ["ctrl+alt+j"], "command": "join_lines" ,  
  "keys": ["ctrl+d"], "command": "run_macro_file", "args": "file": "Packages/Default/Delete Line.sublime-macro" ,//整行删除
  "keys": ["ctrl+h"], "command": "show_panel", "args": "panel": //搜索全文
 "find_in_files" ,
  "keys": ["ctrl+l"], "command": "show_overlay", "args": "overlay": "goto", "text": ":" ,  
  "keys": ["ctrl+o"], "command": "show_overlay", "args": "overlay": //跳转到当前的某个方法
 "goto", "text": "@" ,
  "keys": ["ctrl+up"], "command": "goto_definition" ,//跳转到定义,比如在某个函数上按此键,则跳转到它的定义。
  "keys": ["ctrl+down"], "command": "find_under_prev" ,//选中光标所在的变量或者函数,非常有用
  "keys": ["ctrl+alt+down"], "command": "duplicate_line" ,//向下复制整行
 "keys": ["ctrl+shift+f"], "command": "reindent" , "args":"single_line": //格式化代码,当然也可以利用html+css+js prettify插件来格式化
 false,
  "keys": ["ctrl+shift+r"], "command": "show_overlay", "args": "overlay": "goto", "show_files": true ,  
  "keys": ["ctrl+shift+s"], "command": "save_all" ,  
  "keys": ["ctrl+shift+f4"], "command": "close_all" ,  
  "keys": ["ctrl+shift+y"], "command": "lower_case" ,  
  "keys": ["ctrl+shift+x"], "command": "upper_case"  
]  

 

mac版,绑定Intellij Idea快捷键:

[
   
        "keys": ["shift+enter"],
        "command": "run_macro_file",
        "args":
       
            "file": "Packages/Default/Add Line.sublime-macro"
       
    ,
   
        "keys": ["ctrl+alt+space"],
        "command": "auto_complete"
    , //自动提示
   
        "keys": ["super+shift+up"],
        "command": "swap_line_up"
    , //整行上移
   
        "keys": ["super+shift+down"],
        "command": "swap_line_down"
    , //整行下移
   
        "keys": ["super+Delete"],
        "command": "run_macro_file",
        "args":
       
            "file": "Packages/Default/Delete Line.sublime-macro"
       
    , //整行删除
   
        "keys": ["command+h"],
        "command": "show_panel",
        "args":
       
            "panel": //搜索全文
                "find_in_files"
       
    ,
   
        "keys": ["command+l"],
        "command": "show_overlay",
        "args":
       
            "overlay": "goto",
            "text": ":"
       
    ,
   
        "keys": ["command+d"],
        "command": "duplicate_line"
    , //向下复制整行
   
        "keys": ["alt+command+l"],
        "command": "reindent",
        "args":
       
            "single_line": //格式化代码,当然也可以利用html+css+js prettify插件来格式化
                false
       
    ,
   
        "keys": ["command+shift+s"],
        "command": "save_all"
    ,
   
        "keys": ["command+shift+f4"],
        "command": "close_all"
    ,
   
        "keys": ["command+shift+u"],
        "command": "lower_case"
    ,
   
        "keys": ["command+shift+u"],
        "command": "upper_case"
   
]

 

解决标签栏中文乱码:"dpi_scale": 1.0,

取消自动换行:"word_wrap": "false",


    "font_size": 12,
    "ignored_packages":
    [
        "Vintage"
    ],
    "update_check":false,
    "open_files_in_new_window": false,

 

 

以上是关于自定义Sublime Text快捷键为Eclipse快捷键的主要内容,如果未能解决你的问题,请参考以下文章

Sublime Text自定义扩展-格式化SQL参数 IN

在sublime text3中利用markdown

如何使用Sublime Text 3作为Markdown编辑器

sublime text 3 扩展插件SideBarEnhancements用法教程

如何在sublime text 中使用markdown preview 生成GFM 渲染的html

Sublime text3最全快捷键清单