Offical home page : http:https://www.sublimetext.com/
** Unicode Error **
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 15: ordinal not in range(128)
need to change a line in Sublime Text 2\Packages\Default\exec.py
for k, v in proc_env.iteritems():
proc_env[k] = os.path.expandvars(v).encode(sys.getfilesystemencoding())
# change the line to
proc_env[k] = os.path.expandvars(v.decode(sys.getfilesystemencoding())).encode(sys.getfilesystemencoding())
Ctrl-Shift-P
-> user
The 4 space per tab
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"detect_indentation": false
}
note: detect_indentation
to false
will let Sublime stop to guess which indendation style to use when opening files.
- for sublime 2, vintage is good enough.
presss command-P Prefersu, add fellowing settings
{
//enable "Vintage"
"ignored_packages": []
}
-
for sublime 3 , use vintagous instead. Download from here, copy into "/Users/{your_name}/Library/Application Support/Sublime Text 3/Installed Packages/" folder BTW, although the office doc says vintagous need to ensure Vintage is in the ignored_packages, wried the two can work together in my test.
-
In Mac, need to disable repeat key context menu, see here for more details
defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
Ctrl-`
will open a python console (with embeded inside sublime).
Download from wbond site
-
Install :
CMD-Shift+P
-> enterpkgin
-> entermarkdownextend
-
Make it default :
View -> Syntax -> Open all with current extension as... -> Markdown Extended
- Install :
CMD-Shift-P
-> enterpkgin
-> entermarkdownpreview
- Usage :
Ctrl-Shift-P
(Windows/Linux) orCMD-Shift-P
(Mac) -> enterprewb
Sometimes, you may want a os terminal inside your working folder, here a plugin called sublime_terminal is.
- Install :
Ctrl-SHIFT-P
->pkgin
->terminal
- Usage :
Ctrl-SHIFT-T
open under your fileCtrl-Alt-T
open under your project
- Install :
Ctrl-Shift-p
-> 'pkgin' -. 'git-glutter' Show git-diff in your glutter
- Install :
Ctrl-P
-> 'pkgin' ->git
- Usage :
Ctrl-P
->gits
: list git status
Very useful, see the wiki for more details.
A plugin to create file folder also See here for details
- Install :
Ctrl-P
-> 'pkgin' -> 'AdvancedNewFile' - Usage :
Ctrl-alt-N
fetch a file/files from remote (look it as a curl command executed by a inputted key).
see usage
runs CSS through the Prefixr API (create cross-browser css)
- Uasge :
Ctrl-Shift-C
(Quit use ESC, up and down see the history commands)
- Install :
CMD-P
->pkgin
-> 'sublimerepl' (need to restart )
repl:shell can open a os shell
A framework for interactive code linting
html-tidy
Better than the default code complete.
Go to "Tools > Build System > New Build System" , add code like:
{
"cmd": ["node","$file"],
"selector": "source.js"
}
After that, we can use ctrl-B
to build JavaScript.