Skip to content

Instantly share code, notes, and snippets.

@wongjiahau
Last active August 13, 2017 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wongjiahau/b1ba079e6b58c2ea43c3344b177993d5 to your computer and use it in GitHub Desktop.
Save wongjiahau/b1ba079e6b58c2ea43c3344b177993d5 to your computer and use it in GitHub Desktop.
List of useful mnemonics for vim
W //go to next Word (separated by space)
B //Back to previous Word (separated by space)
dib //Delete inside bracket
daw //Delete a word
dtk //Delete 'till 'k'
cW //Change big word (until a whitespace is reached)
cw //Change small word (until any non-alphabet is reached)
<Ctrl-a> //Add the first number in the current line by 1
<Ctrl-x> //Xubtract the first number in the current line by 1
180<Ctrl-a> //Add the first number in the current line by 180
180<Ctrl-x> //Xubtract the first number in the current line by 180
% //Go to next matching parenthesis
`` //Snap back to where % has jumped from
v/}<ENTER> //Select until the character }
:noh //Clear highlighted words
IF Surround.vim is enabled
S" //Surround highlighted words with "
S( //Surround highlighted words with (
cs{[ //change surrounding brackets from { to [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment