Vim OR Vi Editor

Hit the Esc key; that goes into command mode. Then you can type

  • :q to quit (short for :quit)
  • :q! to quit without saving (short for :quit!)
  • :wq to write and quit (think write and quit)
  • :x to write and quit (shorter than :wq)
  • :qa to quit all (short for :quitall)

When you press :, a : will appear at the bottom of the screen.

Or you can press Esc ZZ (Esc Shift+Z Shift+Z) to write/save if the file was changed, then quit.

Or if you don’t want to save changes you can use ZQ instead.

Vim has extensive help, so type Esc:helpReturn and you will have all your answers and even a neat tutorial.

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