Skip to content

Instantly share code, notes, and snippets.

@CarlosMed
Last active November 18, 2019 20:11
Show Gist options
  • Save CarlosMed/50c8234d36427228f853257f534eeebd to your computer and use it in GitHub Desktop.
Save CarlosMed/50c8234d36427228f853257f534eeebd to your computer and use it in GitHub Desktop.

hjkl = left down up right

[number?] dd = delete a line also copys it to clipboard

G = move to the very bottom

gg = move to the very top

{ = go up an empty line

} = go down an empty line

[number]hjkl = move that amount of numbers in any direction

u = undo

ctrl r = redo

ctrl v = multicursor

. = redo the last command

yy = copy to clipboard

p / P = paste below / Paste above

w / W = next word / Next word after space

b / B = go back a word / back a word after space

t[alphanumeric char] = go before alphanumeric value on the line

f[alphanumeric char] = go ontop of alphanumeric value

% = will take you to the closing alpha keys like {[<]>}

c[w] = change word

d[w] = delete a word

dd / D = delete a line / delete from cursor to end of line

C = delete from cursor and put you in imput mode

C/D[t][}] = will delete till that character ex () => { foo bar }

  • = find word where the cursor is

; = go to next

zz = center to where the cursos is of line

i / I = input where the cursor is / input to the start of the line

x = delete letter from where the cursor is over the charcters

<< / >> = tab left / right

q[key map macro to] / @[key macros mapped to] = repeat an action / use macro

`. = go to lst edited line

ctrl + p or n = auto completion like in vscode

:ab rlw ReallyLongWord = abreviattion on tab

:una rlw = unset abbreviation

zfnj creates a fold from the cursor down n lines.

zo opens a fold on the cursor.

zj moves the cursor to the next fold.

zk moves the cursor to the previous fold.

zd deletes the fold at the cursor.

zE deletes all folds in the document.

zM closes all open folds.

zR opens all folds.

g-Ctrl-g how many words are in your document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment