Skip to content

Instantly share code, notes, and snippets.

@jordifebrer
Last active August 29, 2015 14:05
Show Gist options
  • Save jordifebrer/8e1822af8935a2e79136 to your computer and use it in GitHub Desktop.
Save jordifebrer/8e1822af8935a2e79136 to your computer and use it in GitHub Desktop.
Vim shortcuts

Vim shortcuts

Delete the current line

d + d

Delete the current line + the line below

d + down

Delete the current line + the line above

d + up

To save the file and quit

ZZ (or) :wq!

To search

/something_to_search

To Delete characters

x

Next result

n

Previous result

N

One word to the right

w

One word to the left

b

Move the cursor to the end of the line

$

Move the cursor to the beginning of the line

0

Move one screen down

control + f

Move one screen up

control + b

Create a new line below the cursor and switch to insert mode

o

Move the cursor to the line G

nG

Move the cursor to the last line

0G 

Copy line / n lines

Y / nY

Paste

P

Undo

u

Redo

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