Tips for using sublime
Selecting text
ctrl-D
to select a word. Continue hittingctrl-D
to select subsequent instances of that word.ctrl-L
to select a line.ctrl-A
to select the entire document.ctrl-shift-M
to select something inside a set of bracketsctrl-shift-up_arrow
to move the current line up one (and likewise with down arrow)
Multicursor
If you want to add or remove characters from the beginning or end of a selection of lines from your document:
- Go to the first line of your selection, and hit
ctrl-L
to select that line - Continue hitting
ctrl-L
until every line you want has been selected. - Hit
ctrl-shift-L
and your selection will remain, with a cursor at the end of each line. - Use your keyboard's arrow keys to move the cursor. This will give you a cursor at the same position on each line, relative to the beginning or end of the line.
- Type whatever you wanted to in, and it will repeat on every line.
esc
to get your single cursor back
Open from terminal
If you are in a bash terminal and want to open that directory in sublime:
subl .
The .
(period) is short hand for the current directory.
Any directory can be opened in this way.
subl ~/path/to/my/directory
Fix mouse scroll wheel
I work on a laptop with touchpad and external mouse. Sometimes the scroll wheel on my mouse stops working in Sublime. If I tap on my touchpad, the scroll wheel's powers are reset.