Top 5 Sublime Text Shortcuts
Top 5 Shortcuts That Will Boost Your Coding Productivity
Are you new to the sublime text editor? It’s really more powerful than it looks. While it’s easy navigation with mouse and keyboard all the powerful tools are quickly accessible with a few shortcuts. VIM users will likely stick to VIM after the steep learning curve of the abundance of keyboard navigation and non-existent mouse usage. That’s great for speed and editing in SSH but take a look at the top 5 shortcuts that you can learn in Sublime Text 2. You will go from novice to intermediate a lot faster in Sublime than VIM.
This top 5 list is coming from a non-VIM user, although I’ve tried VIM and appreciate what it has to offer. In my brief opinion, VIM is for the hardcore coder while Sublime is for everyone who likes to code. The following shortcuts are for Mac but you can substitute the CMD key for CTRL on Windows. Also the ‘=’ sign does not include part of the shortcut.
NUMBER 5
SNIPPETS
This is not a shortcut itself, but allows you to include pre-defined text and function names for different languages. You will find some pre-installed in Sublime Text 2, but you’ll have to download packages to your specific programming language. It’s a bit annoying because you’ll need GIT and run terminal but it’s well worth it.
This is an example to do with GIT. Clone the snippet repo into your User directory under Sublime Text.
~/Library/Application Support/Sublime Text 2/Packages/User/
Such as http://emmet.io/ for HTML and CSS and for https://github.com/kswedberg/jquery-tmbundle/tree/master/Snippets jquery/
NUMBER 4
Cmd + D or Double-click a word = highlight all instances of the word
This is great when you want to add quotes or parentheses around the selected text. It’s a lot faster than typing quotes then pushing the arrow keys to close the quotes.
NUMBER 3
Cmd + R = Find symbols.
Symbols is defined by Sublime but in reality it means you can directly find functions in scripting languages or style directives in CSS. The search works in conjunction with the @ symbol if you want to find something in a non-currently opened file.
NUMBER 2
Shift + Cmd + F = Search in all files
This is another great search feature which includes “search & replace” although it works in the current file as well as out of scope and searches all the files and directories in the root folder you have opened in Sublime Text 2.
NUMBER 1
Cmd + P = Find anything mainly files
You have your typical Ctrl+F for finding text, but Cmd+P will allow navigation to another file, package, directory, and menu options of the program itself.
Always remember “fuzzy” searching.