# Sublime Text

Sublime Text is a wonderful code editor. In addition to several powerful features, the main interest of the tool is the possibility to add extensions.

### Extensions

See the dedicated post on My favorites Sublime Text extensions

### Configuration File

The Sublime text configuration is done through a Json file. Here is some configuration keys:

• shift tab indent length
&amp;amp;amp;quot;tab_size&amp;amp;amp;quot;: 4

• unindent with shift tab
&amp;amp;amp;quot;shift_tab_unindent&amp;amp;amp;quot;: true

• display white spaces
&amp;amp;amp;quot;draw_white_space&amp;amp;amp;quot;: &amp;amp;amp;quot;all&amp;amp;amp;quot;

• Display rulers
&amp;amp;amp;quot;rulers&amp;amp;amp;quot;:[80,100],


Here is my config file:

{&amp;amp;amp;quot;auto_complete&amp;amp;amp;quot;: false,
&amp;amp;amp;quot;auto_match_enabled&amp;amp;amp;quot;: false,
&amp;amp;amp;quot;color_scheme&amp;amp;amp;quot;: &amp;amp;amp;quot;Packages/User/Monokai (SL).tmTheme&amp;amp;amp;quot;,
&amp;amp;amp;quot;detect_indenation&amp;amp;amp;quot;: false,
&amp;amp;amp;quot;dictionary&amp;amp;amp;quot;: &amp;amp;amp;quot;Packages/Language - English/en_US.dic&amp;amp;amp;quot;,
&amp;amp;amp;quot;draw_white_space&amp;amp;amp;quot;: &amp;amp;amp;quot;all&amp;amp;amp;quot;,
&amp;amp;amp;quot;font_size&amp;amp;amp;quot;: 10,
&amp;amp;amp;quot;ignored_packages&amp;amp;amp;quot;:
[&amp;amp;amp;quot;Vintage&amp;amp;amp;quot;,
],
&amp;amp;amp;quot;index_exclude_patterns&amp;amp;amp;quot;:
[
&amp;amp;amp;quot;*.log&amp;amp;amp;quot;,
],
&amp;amp;amp;quot;rulers&amp;amp;amp;quot;:
[
80,
100
],
&amp;amp;amp;quot;shift_tab_unindent&amp;amp;amp;quot;: true,
&amp;amp;amp;quot;tab_size&amp;amp;amp;quot;: 4,
&amp;amp;amp;quot;translate_tabs_to_spaces&amp;amp;amp;quot;: true
}


### Projects

When you’re working to a project, you can add all related file into a sublime text project. To this end:

Go to Project=> Add Folder to Project

Select your project directory and now all your files are available in the side bar ( View -> side bar -> show sidebar or CTRL+K then CTRL+B).

Then your files can be reached by the Goto Anything feature (see next section)

Then you can save you project (Project -> save Project), and use the Project Quick switch feature (CTRL+ALT+P)

### Shortcuts

Some very useful shortcuts for Ubuntu:

• CTRL+P : Go to Anything (a.k.a. type to open a file from your project)
• CTRL+R : Go to Function, in a given file, find a class/method
• CTRL+P+: : Go to Line
• F5 : go to definition (function, class,….)
• ALT+- / ALT+SHIFT+- : jump back and Forward (a.k.a. go back and forward in cursor position ). This is a really powerful feature !
• CTRL+SHIFT+T : re-open last closed tab

#### Selection

• selection and CTRL+D : select one by one all occurrences of selection ( press CTRL+K to skip current selection)
• selections and CTRL+L : Multiple cursor at selections positions
• selection and ALT+F3 : select all occurrences of the selection

### Snippets

Sublime text support snippets and activate them through a trigger key (e.g. hit TAB). Snippets are very easy to configure using the documentation.

You just have to create a file with the extension : .sublime-snippet and put it into the Sublime Text User  directory.

Example : ipdb

Here is a quick look of the features I use the most in Sublime Text. I’ll try to update this article simultaneously to my future discoveries (a.k.a. your suggestions in comments 😉 ).

### 3 Comments on “Sublime Text”

1. Nice article on sublime text, but it felt the article ended nicely. Thanks for the post. Do you know if latextools give auto completion also?

• nicolasamiot says:

I’ve just re-add my 2 lines conclusion which has been skipped. Sorry for that. As I mentioned I’ll try to update the article as soon as I discover new features.
About latextools, there are some additional snippets provided after the install which can operates as an autocompletion. I just added link to the github repository which provides a nice documentation of the plugin. By the way, it is worth to mention that the \cite and \ref tag open a popup search tag to find your bibtex entries and your labeled objects respectively.

• Thanks for accepting my suggestion, And it was a great post, I just love Sublime So it was fun to find some one who is also interested in the same text editor.