I know there have already been many articles like this online, but I am teaching a class on Sublime Text and thought it would be good to have all the information online. In this article, we’ll be diving into the best parts of Sublime Text. You’ve probably already heard of some of these, but maybe not some others.
Features
Command Palette ctrl + shift + p
For instance, you are able to call Git commands add, branch, commit, push, and pull all from the command palette.
To Use:
ctrl
+ shift
+ p
File Switching ctrl + p
To Use:
ctrl
+ p
Goto Symbols ctrl + r
To Use:
ctrl
+ r
Sublime Text 3 also has a new feature (Goto Definition). It provides Sublime Text with more capabilities closer to an IDE. Take a look at that if you’re interested.
Multi-Edit ctrl + click
ctrl
+d
: Select the current word and the next same wordctrl
+click
: Every place you click will create a cursor to editctrl
+shift
+f
ANDalt
+enter
: Find a word in your files and then select them all
Snippets
lorem
will generate lorem ipsum text.To Use: Type a word that activates a snippet (ie
lorem
) and press tab
.Here’s a great article on creating snippets.
Keyboard Shortcuts
For a full list of the Sublime Text Keyboard Shortcuts, take a look at our keyboard shortcuts article.
Projects
Using projects, you will no longer have to go digging in Windows Explorer or Finder to get the project you want and drag it into Sublime.
To Save a Project: Go into the command palette and type
save project
To Switch Projects: ctrl
+ alt
+ p
Packages/Plugins
Package Control
The absolutely necessary package manager for Sublime. This is the optimal way to install all of the plugins and themes listed below.
Go ahead and install that at the package control site.
To Use: Go into the command palette (
ctrl
+ shift
+ p
) and type install
.Package Control will load all the packages available for install. Take a look at all the great things you can install and find your favorite packages..
Alignment
To Use: Highlight the lines you want to align and press
ctrl
+ alt
+ a
BracketHighlighter
Colorpicker
Have the ability to change colors with a colorpicker on the fly.
To Use:
ctrl
+ shift
+ c
Note: This plugin is much prettier when using it on Mac
Emmet
To Use:
ctrl
+ alt
+ enter
and start typing your Emmet styled HTMLCheck out our Emmet Interactive Guide to learn more and try out Emmet for yourself.
Git
GitGutter
Gist
This plugin allows you to pull your Gists and insert them into your file. This is helpful when you have a Gist to start an HTML file or any other reusable code you have.
To Use: Open up the command palette and type
gist
. You can also use the shortcuts that are shown.SidebarEnhancements
Here is the old menu vs the SidebarEnhanced menu.
Themes
Install a theme with Package Control and then update your User Settings to use it.
// User/Preferences.sublime-settings
{
"theme": "Soda Light.sublime-theme"
}
Note: You might have to restart Sublime for these changes to take effect.Some popular themes:
Theme – Soda comes with light and dark
Theme – Flatland
Spacegray
“A Hyperminimal UI Theme”. More information found here. Thanks to the link by Jentan Bernardus.More Themes
Color Schemes
To Change Color Scheme: Go into your menus,
Preferences
> Color Scheme
and select one.You will see changes immediately and can check if you like it or not. For a list of some great color schemes, check out Dayle Rees’s colour schemes repo or color sublime, a great project.
Settings
To get to your user settings, use the command palette and type in
user
.Here are my current settings, most are self explanatory. Pick and choose the good parts for yourself and make your own custom settings!
// User/Preferences.sublime-settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",
"font_face": "Ubuntu Mono",
"font_options": "subpixel_antialias",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"rulers":
[
80
],
"scroll_past_end": true,
"tab_size": 4,
"tab_completion": false,
"theme": "Soda Light.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"vintage_start_in_command_mode": true,
"word_wrap": true
}
I use the great Vintage mode
in Sublime. It provides vi editing commands inside of Sublime Text. It
isn’t as fully featured as the original vi package, but it is the
closest that I’ve seen in any text editor currently. That along with
your keyboard shortcuts and command packages will make for a very fast
developer.The settings above automatically turn on Vintage mode when you open a file. If you don’t like this feature, just remove
vintage_start_in_command_mode
and if you want to disable Vintage altogether, remove the ignored_packages
setting.Conclusion
There are so many parts to Sublime that I’m sure I missed some great things. Let me know if you find any other awesome packages or features and happy coding!
Source: http://scotch.io/bar-talk/best-of-sublime-text-3-features-plugins-and-settings