Show PHP function list
- CTRL+r
Clean up code
- CTRL+ALT+t : HTMLTidy
- CTRL+ALT+E : Encode special characters
Tag completion, folding
- CTRL+. : close tag
- CTRL+SHIFT+[ : Fold Code
- CTRL+t : Fold Tag Attributes
- <tag + TAB = autocompletion, e.g. <a + TAB = <a href=””></a>
- <tag> + ALT + . = autocompletion, eg. <a> + ALT + . = <a></a>
Find in file(s)
- CTRL+F : Find in file
- CTRL+SHIFT+F : Find in files (or right click on folder and click Find in Folder)
- CTRL+H : Find and replace in file
Editing
- To select multiple text to edit, hold down CTRL key and click/select different text
- To select a bunch of text: hight some text at one end of your desired selection, scroll to the other end, hold SHIFT and click at the end of the other end.
- To wrap text in open/close parens, highlight text and then hold SHIFT and click “(“. Also works with “, ‘, [, [.
- To select text one character or line at a time, hold shift and hit arrow keys.
- To convert text to uppercase, select text and hit CTRL + k + u
- To convert text to lowercase, select text and hit CTRL + k + l
- To duplicate one or more lines, hit CTRL + SHIFT + D
Comments
- To toggle comment, highlight text, hit CTRL + /
- To toggle block comment, highlight text, hit CTRL + SHIFT + /
Snippets
- lorem ipsum snippet : type “lorem” and hit TAB
Typos
- look at red squigly underlines
Scrolling
- To scroll one line up, down, hit CTRL + up, down key
Preferences (Settings – User)
- To show all whitespace characters, “draw_white_space”: “all”
- To enable spell check, “spell_check”: true
- To set UTF-8 encoding, “default_encoding”: “UTF-8”
Sort Lines
- Case insensitive: Select lines, hit F9
- Case sensitive: Select lines, hit CTRL + F9
Diff
- To diff two files, select (highlight) them, right click, and click “Diff files”
Lint
- SublimeLinter
Open File
- CTRL + p
Sublime Text 2 Plugins Worth Looking Into:
CSSTidy
JSFormat, JsFormat
JSLint
Pretty JSON
JSONLintfy, JSHint
JS Mini, JSMinifier
FileDiff, FileDiffs
SFTP
unicode character highlighter
minifier
compressors
view in browser
synchronized file scrolling
filesync
deleteBlankLines
placeholders (snippets) https://github.com/mrmartineau/Placeholders
clipboard history https://github.com/kemayo/sublime-text-2-clipboard-history
sublime change quotes
color highlighter https://github.com/Monnoroch/ColorHighlighter
liveCSS https://github.com/a-sk/livecss
phpTidy
web encoders, StringEncode
html
YUI Compressor
CanIUse
INI
Clipboard Manager
jQuery
WinMerge
sublimelint, SublimeLinter
indentGuides
indentXML
BracketHighlighter
ColorPicker
sublime-jslint
jQuery Snippets pack
Tag
TrailingSpaces
HTML5
Clipboard History
SublimeCodeIntel
PackageControl