www.netsi.dk

"The internet is just a layer on the real world" (don't forget that!)

Sublime text 2 (SB2) beginners tips

As a newcomer to SB2 I am still working my way around this featured rich editor, guess I am not the only one in that situation, so here goes – a beginners tip on SB2.

 

Windows: Access the

In Sublime text 2 (SB2) there is a console which can be used for many powerfull operations.  The console is in fact a Python console usefull for amoung other testing your own plugins, and a lot of instant commands. It can also be accessed through the menu View | Show Console and the Ctrl+`.

 

I was not happy with the tab size and wanted to change it, but I needed to use the console. The default shortcut I could not use on windows + danish keyboard. So I decided to change it to Ctrl+Shift+c.

Change (short cut) for console access

  1. Open the default shortcut settings
    In the menu select “Preferences + Key Bindings – Default”
  2. Locate the binding for console by searching for “console”
    Default setting is:
    { "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
  3. Copy it and insert it into thChange it to the User bindings:
    Open “Preferences + Key Bindings – User”
    Paste it between the [] (if first time there will be no contents there)
    Change it to:
    { "keys": ["ctrl+shift+c"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }
  4. Save

The effect is instance – no restart of the editor! So test it by pressing “Ctrl+Shift+C”.

Change default tabsize

The default tab size in SB2 is 4 spaces. I found that too much – here is how I changed it.

  1. Open the user settings file:
    In the menu select “Preferences + Settings – User”
  2. Add or change this:
    "tab_size": 2,
    "translate_tabs_to_spaces": false

Remember that all settings files in SB2 are JSON. So if you know your way around JSON you can easy read and understand the settings files. If not, just be happy that you will start to learn JSON, cause it is a very big thing, perhaps as widely spread as XML.

More to come

I will continue to my experiences, cause if you take from the net, you must give to the net.

Share