Sublime 配置&插件推荐

sublime 配置&插件推荐

Sublime编辑器的新鲜特性
同时选中多个 先选中一个 再Command + D
Command + P @搜索函数 #搜索关键字
迷你地图

安装package control
https://sublime.wbond.net/Package%20Control.sublime-package
Preferences-->Browser Packeages 进入到Packages文件夹向上一级找到Installed Packages 将下载的文件丢进去后重启Sublime

安装插件
使用ctrl+shift+p即可打开命令面板(Command Palette)
输入Package Conntrol 显示相关命令 而Package Control:Install Package就是安装新的插件 之后搜索插件就行了

插件推荐
https://sublime.wbond.net/ package control 所有插件列表

编码类
GBK Encoding support
https://github.com/akira-cn/sublime-gbk
可以使sublime正确的打开GBK文件 (对于linux和mac环境下的sublime尤其适用)
下载后将文件夹更名为GBK Encoding Support 丢入Packages中

ConvertToUTF8
https://github.com/seanliang/ConvertToUTF8
在命令面板中输入convert to utf8 就会显示从不同编码转为UTF8的选项


快速书写类
Emmet
https://github.com/sergeche/emmet-sublime
一个能帮你快速书写HTML的工具
前身就是zen coding
此工具的运行需要PyV8的支持 https://github.com/emmetio/pyv8-binaries 有安装教程 [使用包管理器安装会自动安装PyV8]

PS  sublime3的pyv8需要Python3.3以上 !

emmet语法介绍 http://blog.wpjam.com/m/emmet-grammar/

ColorPicker
颜色选择器
https://github.com/weslly/ColorPicker

DocBlockr
生成标准JS注释
https://github.com/spadgos/sublime-jsdocs

jQuery
https://github.com/SublimeText/jQuery
jQuery代码提示 (可惜和CodeIntel冲突)

CodeIntel
https://github.com/SublimeCodeIntel/SublimeCodeIntel
代码提示

格式化类
HTML-CSS-JS Prettify -----强烈推荐
https://github.com/victorporof/Sublime-HTMLPrettify
格式化HTML CSS JS 都可以格式化

我的JS格式设置

  "js": {
    "allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
    "brace_style": "end-expand", // [collapse|expand|end-expand|none]
    "break_chained_methods": false, // Break chained method calls across subsequent lines //链式函数另起一行
    "e4x": false, // Pass E4X xml literals through untouched
    "end_with_newline": false, // End output with newline
    "eval_code": false,
    "indent_char": " ", // Indentation character
    "indent_level": 0, // Initial indentation level
    "indent_size": 4, // Indentation size
    "indent_with_tabs": false, // Indent with tabs, overrides `indent_size` and `indent_char`
    "jslint_happy": true, // Enable jslint-stricter mode  //jslint格式
    "keep_array_indentation": false, // Preserve array indentation
    "keep_function_indentation": false,
    "max_preserve_newlines": 10, // Number of line-breaks to be preserved in one chunk
    "preserve_newlines": true, // Preserve line-breaks
    "space_after_anon_function": true, // Add a space before an anonymous function's parens, ie. function () //匿名函数后的function加上空格
    "space_before_conditional": true,
    "space_in_empty_paren": false,
    "space_in_paren": false, // Add padding spaces within paren, ie. f( a, b )
    "unescape_strings": false, // Decode printable characters encoded in xNN notation
    "wrap_line_length": 0 // Wrap lines at next opportunity after N characters
  }

Alignment
https://github.com/wbond/sublime_alignment
赋值语句对齐

其它
BracketHighlighter‎
https://github.com/facelessuser/BracketHighlighter%E2%80%8E
关于这里可以参考http://www.cnblogs.com/cart55free99/p/3502025.html

选中区域

这是按照层级选中的一个插件 每按一次命令就可以选中更多内容

expand-region

配置  KeyBindings -User  可以自己指定快捷键

[
{ "keys": ["ctrl+e"], "command": "expand_region" }
]

最后说说Settings

Sublime的设置和其他编辑器很不同  所有的设置都是通过编辑json格式的文件来实现

默认配置  Preferences--- Settings Default 

用户级别配置  Preferences--- Settings User

{
    "bold_folder_labels": true,
    "caret_style": "wide",
    "close_windows_when_empty": true,
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    "drag_text": false,
    "draw_white_space": "all",
    "font_size": 14.0,
    "highlight_line": true,
    "ignored_packages":
    [
        "Vintage"
    ],
    "indent_to_bracket": true,
    "save_on_focus_lost": true,
    "soda_classic_tabs": true,
    "soda_folder_icons": true,
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "wide_caret": true,
    "word_wrap": true,
    "show_full_path": true,
    "always_show_path_on_tabs": true
}

PS 这个配置是融合了Afterglow

{
    "Seti_SB_big": true,
    "Seti_SB_med": true,
    "Seti_no_blue_bar": true,
    "Seti_tabs_med": true,
    "Seti_tabs_small": true,
    "bold_folder_labels": true,
    "caret_extra_bottom": 3,
    "caret_extra_top": 3,
    "caret_extra_width": 2,
    "caret_style": "wide",
    "close_windows_when_empty": false,
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    "drag_text": false,
    "draw_white_space": "all",
    "folder_exclude_patterns":
    [
        "bower_components",
        "node_modules"
    ],
    "font_face": "Consolas",
    "font_size": 16.0,
    "highlight_line": true,
    "ignored_packages":
    [
    ],
    "indent_to_bracket": true,
    "overlay_scroll_bars": "enabled",
    "save_on_focus_lost": true,
    "sidebar_row_padding_large": true,
    "sidebar_size_14": true,
    "tab_size": 4,
    "theme": "Afterglow.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "update_check": false,
    "wide_caret": true,
    "word_wrap": true,
    "show_full_path": true
}

Theme的  所以得先下载好Theme

Sublime编辑器主题 http://www.cnblogs.com/cart55free99/p/3795144.html
PS
删除空白行

替换中搜索 ^   替换一栏不填

PS  SUB3注册码

—– BEGIN LICENSE —–
Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F
942194A6 02396E98 E62C9979 4BB979FE
91424C9D A45400BF F6747D88 2FB88078
90F5CC94 1CDC92DC 8457107A F151657B
1D22E383 A997F016 42397640 33F41CFC
E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D
5CDB7036 E56DE1C0 EFCC0840 650CD3A6
B98FC99C 8FAC73EE D2B95564 DF450523
—— END LICENSE ——
原文地址:https://www.cnblogs.com/cart55free99/p/3731278.html