Vim – Quick Start

Although I am typing this blog post on vim with html. I sometimes do not use Vim. I am all around the place with Atom sometimes, or Gedit or pluma or Visual Studio Code sometimes. But then I come back to vim for the simplicity of things. When I do, i sometimes forget what i need to know to get back to my old Vim state. This one is for me to read this blog post in two minutes and getting back to work.

I don’t think i have to say what mode these commands have to be used in.

  • i to insert text
  • Esc to exit edit mode
  • v for visual select
  • shift + v or V for visual lines
  • ctrl + vfor visual block
  • y to yank/copy
  • x to cut/delete
  • p to paste on the next line.
  • shift + p or P to paste right where the cursor is.
  • :w to write
  • :q to quit
  • :wq to save and quit
  • :e filename to open a new buffer with file specified
  • :ls to list all the buffers. # is the previous buffer. %a is the active buffer
  • :b buffernumber to switch to that buffer
  • :b # to switch to the previous buffer
  • :bd buffernumber to delete a particular buffer.
  • u to undo

This should be enought to get you going.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s