Skip to main content

Sublime Text2 Plugin Configuration

Free2015-06-16#Tool#Sublime Text2插件#Sublime Text#Sublime Text2插件配置#sublime

To make Sublime work smoothly, you must use plugins, but many plugins require manual configuration. This article provides a plugin configuration file package, just download and replace directly.

Preface

I've been using Sublime for 2 weeks now, initially without plugins, then installed a bunch of plugins, now only kept the best few plugins, some plugins require manual configuration, all configured

1. Declaration

I'm used to installing various software in D:\Program Files, including Firefox, NodeJS, etc., because some plugins need to configure paths for node.exe and other files, so friends whose installation path is different from mine may need to manually modify the path

I like green comments, hate the default gray, and changed Sublime's current tab page title to red. Currently the project team requires unified use of single quotes, if you don't like these preferences, please find a way to change them back yourself

Some shortcut key settings are also personal preferences, if not comfortable please modify yourself, common shortcut key list will be given later

2. Useful Plugins

Better Completion

Code hinting, code completion (auto-complete) functionality is very powerful, supports various languages, js, css, grunt configuration file syntax, PHP and even SQL

BracketHighlighter

Highlights bracket pairs, default underline is indeed not easy to see, with this it's good

Colorcoder

More vibrant code blocks, making black and white code blocks more colorful, easier to see clearly

CSS Format

Expand/collapse CSS code, useful when writing large sections of CSS

CSScomb

Very powerful functionality, can organize CSS rule order, such as separating width/height, color, margin rules with blank lines, easy to modify and prevents style duplication

Disadvantage is it's quite temperamental, must be css suffix file, and file path cannot contain Chinese (filename can be Chinese), otherwise error prompts Unicode Error or node path setting is wrong, no matter how you modify it doesn't work

CSSLint

Can check CSS errors, prompt for duplication, etc., mainly used with SublimeLinter, SublimeLinter will be introduced later, a very useful thing

DocBlockr

Documentation comment generation tool, I came for this, note pad++ actually doesn't have a plugin for generating js comments, abandoned it

Emmet

One of the most powerful plugins, hand speed not fast enough, coding slow? No problem, we have abbreviations, 30 words/minute can also code very fast

GBK Encoding Support

Essential plugin, if you open a txt and find Chinese garbled, use this and it's correct

HTML-CSS-JS Prettify

Mainly used to format HTML, not many Sublime2 plugins support formatting HTML, this one is relatively good to use

JsFormat

Used to format js code, not commonly used, mainly used to read others' code, quickly format when seeing uncomfortable code style

JSHint

Can check js errors, used with SublimeLinter, lightweight editor that can prompt js syntax errors, waited a long time for this

Not recommending jslint plugin, always reports some trivial errors, configuration is also hard to modify

Note, installing this alone is useless, need nodejs and jshint, jshint installation method is npm install jshint -g

Package Control

Essential, managing plugins is super convenient, online download immediate install restart effective, good to use

SublimeLinter

One of the most powerful plugins, still envious of red wavy line error prompts in eclipse and vs? With this, easily report errors

View In Browser

Used to make up for Sublime's inability to run html, default shortcut Ctrl + Alt + browser first letter abbreviation, such as C ~ Chrome, F ~ Firefox, I ~ IE

3. Common Shortcuts

  • Alt + X: Open html in default browser (Chrome)

  • Ctrl + Shift + J: Execute jshint

  • Ctrl + S: Save file and execute SublimeLinter to check errors, errors will have white border around them, and will popup display error list

  • Ctrl + Shift + C: Execute CSS Comb to rearrange css styles

  • /** + Enter: Generate js comments (API documentation comments, style similar to JSDOC)

  • Ctrl + E: Execute Emmet, expand abbreviations

  • Others: Select code, right-click choose plugin to execute

4. Configuration Package Download

Baidu Netdisk: Click me to download

Download and extract to Sublime plugin installation path, overwrite original package folder and it's done

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment