A list of Sublime useful shortcuts and tips
-
ctrl + 0 : switch to side pane, Esc to back to normal
-
Cursor Movement
- Fn + End : End of Line
- Fn + Home : Start of Line
- Ctrl + Left/Right : Selects one words left or right
- Ctrl + M : Jump to matching bracket.
- Ctrl + G : Go to any line within a file
-
Alt + - : Jumps back to the previous location. Useful when you need to go to a place to correct that and then jump back to the previous location.
-
Ctrl + ? : Comments/Uncomments a line
-
Ctrl + D : Mutiple Selection, Ctrl + K to skip current instance, Ctrl + U to unselect current instance
-
Ctrl + L : expands the Selection into line, with Shift splits the selection into lines
-
Ctrl + Shift + Up/Down : Moves current line or a selected block up or down
-
Ctrl + Shift + M : expands selection to brackets
-
Ctrl + P: Opens GoTo Anything.
-
Search or browse through any file which is there in the opened projects list.
-
To search at a particular line no use :.
Eg: line no 100 in models.py with
models.py:100
-
For a paritcular keyword use @ Eg: word requests in views.py with
views.py @requests
-
In a Html file, to naivgate to any class, just type # and then a list of all tags, classes will appear.
-
-
Ctrl + [ or ] : Indent / Unindent the current line or selection
-
Ctrl + Shift + K : Delete or entire line or Cut that line
-
Ctrl + Shift + P : Open command Palette
-
Ctrl + ` : opens up a python interpreter(Python 3.3)
-
Ctrl + Enter : Search multiline text
-
Ctrl + T : Transpose things
-
Macros : Sequence of command that you can record and repeat
- Ctrl + Alt + Q : Start/stop recording (goes in buffer)
- Ctrl + Alt + Shift + Q : Repeat the recorded macro
Tips :
- A quick way to switch to any open file is Ctrl + P, then select the file by Arrow Key or type its name and Enter.
- To open any project in the same sublime window, cd to that directory and type
subl . -a
- Typing a program, need to build it. Use Ctrl + B (Can't take input).
- Use Shift + F11 to switch to distraction free mode.