当前位置:   article > 正文

Sublime Text 3 离线安装controll package,pretty json, Sublimerge, SqlBeautifier_sublime插件离线安装

sublime插件离线安装

1、离线安装controll package

  1. Click the Preferences > Browse Packages… menu
  2. Browse up a folder and then into the Installed Packages/ folder
  3. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  4. Restart Sublime Text

2、离线安装pretty json

2.1 下载

  1. git clone https://github.com/dzhibas/SublimePrettyJson.git
  2. cd SublimePrettyJson
  3. git checkout st3

2.2 放到合适文件下

打开sublime3->Preferences->Browse Packages,将文件夹SublimePrettyJson拷贝至这个目录下

3、更改pretty json快捷键(改为ctrl+j 或mac上:cmd+j)

因为pretty json快捷键用着不爽,

preferences里面,key binds更改

{ "keys": ["ctrl+alt+j"], "command": "join_lines" },//这个是原生的ctrl+j, 是把非一行的变成一行。感觉和pretty json是反着来的,也可以是任何非json的,比pretty自带的快捷键好用。
{ "keys": ["ctrl+j"], "command": "pretty_json" },//这个就是改进后的新快捷键

附我的快捷键(eclipse):

  1. [
  2. { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
  3. { "keys": ["f12"], "command": "htmlprettify"},
  4. { "keys": ["f1"], "command": "fold" },
  5. { "keys": ["f2"], "command": "unfold" },
  6. { "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  7. { "keys": ["ctrl+space"], "command": "auto_complete" },
  8. { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
  9. [
  10. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  11. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  12. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  13. ]
  14. },
  15. { "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
  16. { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
  17. { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": true } },
  18. { "keys": ["ctrl+shift+f"], "command": "reindent" , "args": {"single_line": false}},
  19. { "keys": ["alt+up"], "command": "swap_line_up" },
  20. { "keys": ["alt+down"], "command": "swap_line_down" },
  21. { "keys": ["ctrl+alt+down"], "command": "duplicate_line" },
  22. { "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  23. { "keys": ["ctrl+shift+s"], "command": "save_all" },
  24. { "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  25. { "keys": ["shift+ctrl+f4"], "command": "close_all" },
  26. { "keys": ["shift+ctrl+y"], "command": "lower_case" },
  27. { "keys": ["shift+ctrl+x"], "command": "upper_case" },
  28. { "keys": ["ctrl+alt+j"], "command": "join_lines" },
  29. { "keys": ["ctrl+j"], "command": "pretty_json" },
  30. { "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "find_in_files"} },
  31. { "keys": ["ctrl+alt+h"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
  32. { "keys": ["alt+-"], "command": "move", "args": {"by": "subwords", "forward": false} },
  33. { "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
  34. { "keys": ["alt+left"], "command": "jump_back" },
  35. ]

mac(ctrl -> super)

  1. [
  2. { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
  3. { "keys": ["f12"], "command": "htmlprettify"},
  4. { "keys": ["f1"], "command": "fold" },
  5. { "keys": ["f2"], "command": "unfold" },
  6. { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  7. { "keys": ["super+space"], "command": "auto_complete" },
  8. { "keys": ["super+space"], "command": "replace_completion_with_auto_complete", "context":
  9. [
  10. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  11. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  12. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  13. ]
  14. },
  15. { "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
  16. { "keys": ["super+shift+c"], "command": "toggle_comment", "args": { "block": false } },
  17. { "keys": ["super+shift+c"], "command": "toggle_comment", "args": { "block": true } },
  18. { "keys": ["super+shift+f"], "command": "reindent" , "args": {"single_line": false}},
  19. { "keys": ["alt+up"], "command": "swap_line_up" },
  20. { "keys": ["alt+down"], "command": "swap_line_down" },
  21. { "keys": ["super+alt+down"], "command": "duplicate_line" },
  22. { "keys": ["shift+super+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  23. { "keys": ["super+shift+s"], "command": "save_all" },
  24. { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  25. { "keys": ["shift+super+f4"], "command": "close_all" },
  26. { "keys": ["shift+super+y"], "command": "lower_case" },
  27. { "keys": ["shift+super+x"], "command": "upper_case" },
  28. { "keys": ["super+alt+j"], "command": "join_lines" },
  29. { "keys": ["super+j"], "command": "pretty_json" },
  30. ]

4、手动安装文件对比工具:Sublimerge 3.sublime-package

a). 下载安装包:Sublimerge 3.sublime-package
b). 在Sublime中选择菜单: Preferences > Browse Packages...
c). 进入上一级目录
d). 进入"Installed Packages"目录,把下载的安装包拷贝到这里
e). 重启Sublime Text完成安装!

5、离线安装sql格式化工具:SqlBeautifier (如安装6,则5不用安装)

a). 下载安装包:GitHub - zsong/SqlBeautifier: A sublime plugin to format SQL. It supports both sublime 2 and 3.  -> code -> download ZIP

b). 在Sublime中选择菜单: Preferences > Browse Packages...
c). 把下载的安装包放这里
d). 解压到当前文件夹
e). 重启Sublime Text完成安装!

使用:见官网:GitHub - zsong/SqlBeautifier: A sublime plugin to format SQL. It supports both sublime 2 and 3.

6、离线安装 SQLTools

Navicat是收费。mysql work bench 又难用。所以当时还研究了一下这个,没想到挺好用的。安装完这个,5是不用安装了。

a). 下载安装包:GitHub - mtxr/SublimeText-SQLTools: SQLTools for Sublime Text 3  -> code -> download ZIP

b). 在Sublime中选择菜单: Preferences > Browse Packages...
c). 把下载的安装包放这里
d). 解压到当前文件夹,重命名SQLTools
e). 重启Sublime Text完成安装!

更多使用方法:SQLTools | Sqltools

7、安装Sublime Merge | Git client from the makers of Sublime Text

安装好后,会自动在sublime集成,在sublime中打开git相关项目,右键会有file history和line history,能看到文件更改历史

8. 以上内容在线安装

Sublime Text 4 如何安装Package...

  1. 首先打开Sublime Text,使用快捷键Shift+Ctrl+P,弹出查找栏
  2. 在搜索框中直接输入关键字 install ,出现下拉选项。
  3. 点击选择其中的:Install Package Control,回车安装
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/629564
推荐阅读
相关标签
  

闽ICP备14008679号