首页 > 代码库 > sublime text3 安装配置

sublime text3 安装配置

 

Package Control组件:
    1. 按Ctrl+`调出console
    2. 粘贴以下代码到底部命令行并回车:
  1. import urllib.request,os; pf = ‘Package Control.sublime-package‘; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), ‘wb‘).write(urllib.request.urlopen( ‘http://sublime.wbond.net/‘ + pf.replace(‘ ‘,‘%20‘)).read())
  1. 重启Sublime Text 3。
  2. 如果在Perferences->package settings中看到package control这一项,则安装成功。

安装插件ctags

  1. win + shift +p  ,在弹出的输入框 输入 install 选择 install package

  2.输入 ctags ,选中相应的选项安装

  3. mac 安装ctags :brew install ctags

  mac :

  问题 :[Errno 1] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option -- R

    打开菜单在Preferences(设置)菜单中打开Package Control(插件管理器)settings->ctags->settings-user 添加:"command": "/usr/local/bin/ctags"

 

自定义快捷键:

  打开Preferences -> Key Bindings - User 

  [// 删除当前行
  { "keys": ["ctrl+d"], "command":"run_macro_file", "args": {"file":"Packages/Default/Delete Line.sublime-macro"} },
  // 复制选中行到行后
  { "keys": ["ctrl+j"], "command":"duplicate_line" },
  // 与上行互换
  { "keys": ["alt+up"], "command":"swap_line_up" },
  // 与下行互换
  { "keys": ["alt+down"], "command":"swap_line_down" },
  { "keys": ["alt+/","alt+/"], "command":"insert_best_completion" },
  //缩进
  { "keys": ["shift+tab"], "command":"unindent" },
  ]

设置自动换行:

  打开Preferences ->Settings - User

  "word_wrap":true

sublime text3 安装配置