Do you find it difficult to write or debug your code?
Here is something which can help you code faster and make your life simple.
Sublime Text editor is one such editor which can make you forget other editors.
If one finds out these specialties, they would never go back to any other editor or may be would not even try any other editor.
- Multiple cursors: It helps you to navigate easily and edit the code around the braces.
- Vintage mode: This is really useful for people who do not use keyboard shortcuts
- Very fast code editor: Sublime Text 2 itself opens instantly. Files open instantly.
- Offers a command palette: It consists of all the functionality you might require during your project
- Plug-in community: It has a very active plug-in community. If you have thought of creating a new plug-in, there are chances that they have already been created and you just need to install them.
It is a closed source project and is available for OS X, Windows and Linux.You can buy it here.
It uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform.
Configuration files in Sublime Text are text files that conform to a predefined structure or format. JSON predominates, but you’ll find XML files too. For the more advanced extensibility options, Python source code files are used.
It has real time built in Python console for interactivity.
It supports variety of languages. Few of which are AppleScript, C, MATLAB, C#, PHP etc.
Many have been working on other editors such as vim. For them, Sublime Text 2 has a Vintage Mode.Vintage is a vi mode editing package for Sublime Text 2. It allows you to combine vi’s command mode with Sublime Text’s features, including multiple selections.
Vintage mode is developed in the open an you can contribute to it. Vintage includes most basic actions: d (delete), y (copy), c (change), gu (lower case), gU (upper case), g~ (swap case), g? (rot13), < (unindent), and > (indent).
It has various color schemes and other visual themes in preferences. It has a wonderful syntax highlighting scheme which can be customised.
In addition to that other themes can also be added and customized. It is very flexible and almost anything can be customized from Key Bindings to Macros just with simple JSON files.
It consists of a side bar which helps in switching to the portion of the code you want to refer to. Just one click on the side bar will take you to the selected portion of the code.
Switching a project.
Ctrl + Alt + P will help you to switch to other project. If you have switched to another project without saving it, the work is restored the next time you open it.
Screen shot showing a C++ code.
Ctrl+Shift+L helps to split the selection into lines .You can select multiple occurrences of a word by pressing Ctrl + D. You can also swap adjacent words by pressing Ctrl + T. You can edit multiple line of code by selecting an entire column at a time.
Column can be selected by pressing Alt + ⇧ + Up and Alt + ⇧ + Down.
All cursors then behave as if each of them was the only one in the text.
And other small things which can come in handy are:
Open search panel Ctrl + F
Toggle regular expressions Alt + R
Toggle case sensitivity Alt + C
Toggle exact match Alt + W
An very important thing which has made sublime a success is its ability to Goto Anything
Goto Anything panel is lightning fast and gives quick results. Working on multiple large code bases becomes easier, where there may be different classes with the same base filename. It is a very cool feature which increases the rate at which work can be done.
It can be triggered with Ctrl+P, it is possible to type part of a file name to open it or type @ to jump to symbols, # to search within the file, and : to go to a line number.
name :10, will open the ‘name’ and take you to line 10.
And to close Got Anything just press Esc.
Distraction Free Mode
Distraction Free Mode shows your files full screen, with nothing but text shown in the centre of your monitor. All UI chrome is hidden, but accessible. Distraction Free Mode can be entered into via the View/Enter Distraction Free Mode menu item.
When in Distraction Free Mode, all UI chrome (side bar, minimap, status bar, etc) will be hidden. You can selectively enable parts of the UI via the View menu – your settings will be remembered next time you enter Distraction Free Mode.
As told earlier, search is very efficient and lightning fast. Just by typing the shortest set of unique characters you can find your desired word which can be done by triggering Ctrl + F.
Based on the language you are working with, Sublime Text helps you complete the entries and also completes the variables created by the user.
Few other features are:
Find as you type, begins to look for the text being entered as the user types without requiring a separate dialog box.
Spell check function corrects as you type.
Repeat the last action.
A wide selection of editing commands, including indenting and un-indenting, paragraph re-formatting and line joining.
Almost everything can be done with the keyboard. It has shortcuts for almost all the features in it. It will definitely be useful for the people who avoid using mouse.
These are just few reasons why one should at least try using Sublime Text 2. To try an unregistered version of it, check out this and download the relevant package. After using it, you would definitely recommend this to others.