SublimeText is a text editor, though it’s far beyond a normal text editor. The developers describe it as:
Sublime Text is a sophisticated text editor for code, markup and prose.
You’ll love the slick user interface, extraordinary features and amazing performance.
There you go, that’s what it is and I’m sure you agree to the extraordinary features and amazing performance as soon as you know SublimeText!
Why should I use SublimeText?
There are so many reasons why we love SublimeText, and here are a few of them:
- Goto Anything: You can easily jump to a file, class, method, line just with a simple key stroke.
- Command Palette: You can easily access advanced functionality / commands, with a simple keystroke.
- Multiple Selections: You can select multiple occurrences and edit them the same time.
- Views/Layouts: You can use your full monitor to display multiple files at the same time, with different layouts. You can even split a single file into two separate views.
- VI mode: You can access a VI mode, so that you can control your editor with well-known VI commands / keyboard shortcuts.
- API: SublimeText has a really powerful API, and there are hundreds of plugins which make use of that.
- Customisable: SublimeText is fully customisable! You don’t like a keyboard shortcut? No problem, just change it!
The main reason why we like SublimeText is the API. Not because we’re developing plugins, but because there’s a project called Package Control, which provides a platform for all kind of plugins. It is amazing how this little editor can be adjusted to match your personal needs. You’re missing a feature? Don’t panic, there might be a plugin for it! You don’t like a specific behaviour? No problem, nearly everything is customisable! You’re not used to a default keyboard shortcut? Well, feel free to change it to your preferred shortcut!
Again, SublimeText is THE CUSTOMISABLE editor out there! Once you see behind the scenes, you really start to appreciate and enjoy it!
Install SublimeText
You can get SublimeText for Linux, Mac OS X and Windows here:
- SublimeText 2
- SublimeText 3 beta (we use that one)
It’s based on Python, so if you’ve installed Python (which is installed on most operating systems by default), you can just run SublimeText.
I already mentioned Package Control before, and I think this is a must-have for SublimeText. To install it, browse to the Installation page and follow the description.
Learn SublimeText
I don’t have a plan how to introduce you to SublimeText. However LevelUp Tutorials has!
My settings
Here’s my user config for SublimeText:
{ /* * UI appearance. */ "highlight_line": true, "draw_minimap_border": true, "rulers": [ 80 ], "font_size": 11.0, "theme": "Soda Dark 3.sublime-theme", "soda_classic_tabs": false, "soda_folder_icons": true, /* * UI behaviour. */ "open_files_in_new_window": false, "remember_open_files": false, "overlay_scroll_bars": "enabled", "vintage_start_in_command_mode": true, /* * Localization. */ "dictionary": "Packages/Language - English/en_GB.dic", "fallback_encoding": "Western (ISO 8859-1)", /* * Auto complete. */ "auto_complete": false, "auto_complete_delay": 1000, "tab_completion": false, "auto_match_enabled": true, "codeintel_live": false, /* * Indentation. */ "auto_indent": true, "detect_indentation": true, "shift_tab_unindent": true, "tab_size": 4, /* * White spaces. */ "translate_tabs_to_spaces": true, "trim_automatic_white_space": true, "trim_trailing_white_space_on_save": true, /* * Ignored packages. */ "ignored_packages": [ ], }
As you can see, I use the Soda Dark Theme, which IMHO is a really nice theme. To enable the SublimeText VI-mode, you’ve to remove vintage from the ignored_packages list, and set vintage_start_in_command_mode to true, if you like that behaviour.
My packages
PackageControl
https://packagecontrol.io/, the root of all the packages!
Alignment
Alignment is a great public for easy alignment of multiple selections, for example variable assignments.
Just select a bunch of variable assignments, hit cmd+ctrl+a (OS X) / ctrl+alt+a (Linux / Windows) and the assignments will be aligned.
Screenshots available on the project page:
Color Highlighter
Color Highlighter is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes with their real color.
DashDoc
DashDoc provides integration of Dash into SublimeText.
Just make a selection, hit ctrl+h and you’ll lookup the selected text in Dash.
Emmet
Emmet allows you to expand abbreviations with Tab key in HTML, XML, HAML and CSS/SASS/LESS/Stylus documents.
Have a look at this awesome tutorial.
GitGutter
GitGutter displays diffs in the gutter next to the line numbers:
Hayaku
Hayaku provides tools for writing CSS faster.
Have a look at this awesome tutorial.
Markdown Preview
Markdown Preview lets you build and preview Markdown files quickly in your browser. You can choose between the built-in Python markdown and GitHub flavoured Markdown.
Pretty JSON
Pretty JSON will prettify a selection of JSON, or the full window by hitting cmd+ctrl+j (OS X) / ctrl+alt+j (Linux / Windows).
Pretty YAML
Pretty YAML will prettify a selection of YAML, or the full window by hitting cmd+ctrl+y (OS X) / ctrl+alt+y (Linux / Windows).
Python PEP8 Autoformat
Python PEP8 Autoformat is a plugin to interactively reformat Python source code according to PEP8. While editing your Python source code, hit ctrl+shift+r and your code will automatically be formatted according to PEP8.
When you use the Alignment plugin, you should disable E221:
{ "ignore": [ "E221" // we still want to use the Alignment package ], }
SublimeCodeIntel
SublimeCodeIntel is a full-featured code intelligence and smart autocomplete engine.
SublimeGit
SublimeGit is the full-featured git integration for SublimeText.
You can access all your git commands via Command Palette.
TodoReview
TodoReview is a plugin for reviewing todo (and other) comments within your code:
6 Comments