Sublime text basics
Tabs
Ctrl
-n
- create new tabCtrl
-w
- close current tabCtrl
-tab
- move to the next tab
Command palette
If you don’t know hotkeys for a command, or don’t know if such
a command even exists, use command palette. It’s the first place
where you should search for unknown commands. To open the command
palette, press Ctrl
- Shift
- p
, and then type command
name. For example, you want to transform selected text to upper case.
This is what you should do:
Ctrl
-Shift
-p
- Type text “lower”
- Select “Convert case: Lower case” command ( moving arrows ),
and press
Enter
(or click )
Sidebar
Ctrl
-0
- focus on sidebarCtrl-k, Ctrl-b
- toggle sidebar
Layouts
Sublime Text allows you to open a few tabs side by side.
Alt
-Shift
-1
- leave only one edit bufferAlt
-Shift
-2
- split window vertically ( 2 tabs )Alt
-Shift
-3
- split window vertically by (3 tabs)Alt
-Shift
-4
- split window vertically by (4 tabs)Alt
-Shift
-5
- “Grid layout”. Two windows in a rowAlt
-Shift
-8
- Split horizontally, 2 tabsAlt
-Shift
-9
- Split horizontally, 3 tabs
You can move between layout windows with Ctrl
+ <number>
hotkeys.
Ctrl
- 0
- move to the sidebar, Ctrl
- 1
- move to the first tab,
Ctrl
- 2
- move to the second tab, and so on.
Line manipulation
Ctrl
-Shift
-arrow up/arrow down
- move the current line up/downCtrl
-c
- copy the whole lineCtrl
-x
- cut the whole lineCtrl
-Shift
-arrow up/down
- move the line up/down
How to install packages (plugins)
First, you need to install package control. It’s the Sublime Text package manager.
- Open control palette (
Ctrl
-Shift
-p
) - Type “Install package control”, press enter
- When package control is installed, open control palette and type “Install package” - press enter.
- Then start typing package name, for example “Color scheme”. Sublime Text will show related packages.
Multiple cursors
Sublime Text has a great support for working with multiple cursors.
To set an additional cursor, use Ctrl
- click
. Then, all commands
( like moving cursor, char/word deletion etc) will be applied to all
cursors.
There’s also nice feature in Sublime Text - you can select next occurance of the current word. It works this way:
- Press
Ctrl
-d
on current word. It will be selected. - Press
Ctrl
-d
one more time. The next occurance of this word will be selected.
This is useful when you want, for example, delete or replace some occurances of a word.
Working with code
These commands may be useful for programmers.
Ctrl
-m
- move between brackets. Works even if the cursor is placed in the middle of text between them.Ctrl
-Shift
-m
- select text between bracketsCtrl
-g
- go to lineCtrl
-;
- open dialog with all words in the current document. Start typing, then select required word withEnter
. Then you can move to the next occurance of the word withF3