Skip to content

Instantly share code, notes, and snippets.

@Usse
Created July 10, 2014 20:07
Show Gist options
  • Save Usse/c360e691650cb49c62ca to your computer and use it in GitHub Desktop.
Save Usse/c360e691650cb49c62ca to your computer and use it in GitHub Desktop.
Legend
C = ⌘ : Command key
Ct = ⌃ : Control key
Cr = ↩ : Return or Enter key
O = Option or Alt key
S = ⇧ : Shift key
D = ⌫ : Delete key
Dn = ↓ : Down arrow key
Up = ↑ : Up arrow key
Esc : Escape key
- = : Next key command
, = Next set of key commands
: = Description prefix
}/# : Misc keys like } or / or # are as typed
Useful
C-S-w : wrap selection in tag
C-O#2 : split vertical window pane into one two or three(C-O#3)to view files side-by-side
C-k,C-S-Up : split horizontal window pane to view files on top of each other
C-S-p : open command palette
C-k,C-b : toggle side bar
C-p : goto any project file, prefix : for line num, prefix @ for class/definition
C-r : go to line/symbol -r
O-g : go to class/definition
Ct-S-p : show selection's scope in status bar
C-y - repeat last keyboard shortcut
C-Ct-S-f : distraction free mode
Selection
C-d : select word or hit again for multiple cursor word select
C-l : select line or hit again for multiple cursor line select
C-l-S : move cursor or multiple cursors to end of line
Esc : multiple select to single select
O-C-g : select word on next line editing
Ct-S-a : select everything in a tag
O-S-m : select contents of current parentheses
Find
Ct-C-g : find all select all occurances
C-f : find/find next -g
S-C-g : find previous
C-i,Cr : incrimental find next and Cr to select
Editing
S-C-v : paste w/ proper indents
O-u : autocomplete suggestion
C-} : indent/unindent { current line
C-/ : commend/uncomment text
O-C-{ : fold/unfold } selection
C-k,C-j : unfold all
C-Ct-Up : move line up/down -Dn
C-x : delete line
C-Cr : insert line after
C-S-d : dupe line
C-j : join line below current
C-k,C-k : delete until end of line
C-k-D : delete from beg of line
C-k,C-u : transform to uppercase/lowercase -l
Vintage Mode
Use vi/vim commands in st3. Vintage package must be unignored in settings.
Editing
:w - write/save via command palette C-S-p
:e - edit file
:g - global command :[range]g/<pattern>/cmd
:g/^\s*$/d - deletes all blank spaces in line, ^ is start, \s* is zero or more whitespace chars, $ is end of line
d - delete
y - copy/yank
c - change
< - unindent
> - indent
gu - lower case
gU - upper case
g~ - swap case
Motions
Sublime vintage supports many vim motions.
l, h, j, k, W, w, e, E, b, B, alt+w (move by sub-words), alt+W (move backwards by sub-words), $, ^, %, 0, G, gg, f, F, t, T, ^f, ^b, H, M, and L *, /, n, N, s, S and more...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment