• Important: We recently upgraded our forum software - please let us know if you run into any issues.

How to quit vi/vim

Rob

Administrator
Staff member
This has been a long term joke, but as an avid vim user, it's simple.

Once you open your file and edit it, to quit vi/vim, you simply:

Quit without saving:
ESC, then :q

If you ctrl-c, you'll create a swap file..

Quit with saving:
ESC, then :ZZ

Vim is really the ultimate editor.. learn to use it and you'll get a promotion at work ;)
 


Pawan Bahuguna

New Member
This has been a long term joke, but as an avid vim user, it's simple.

Once you open your file and edit it, to quit vi/vim, you simply:

Quit without saving:
ESC, then :q

If you ctrl-c, you'll create a swap file..

Quit with saving:
ESC, then :ZZ

Vim is really the ultimate editor.. learn to use it and you'll get a promotion at work ;)

I am in the habit of using ESC :wq!
 

blackneos940

Active Member
OpenBSD kinda forced me to learn Vim, since the default install doesn't include Nano..... :) So, another way, if someone didn't post it, is this: when at the last character on a line, press the Right Arrow on your Keyboard..... :3 Now, you're in interactive mode..... :) I don't know much beyond this: type ; Scratch that..... Vim on Linux is different..... :( :( :(
 

rahul chauhan

New Member
VI commands for day to day working:
Note: **Press ESC key to come out of VI

:q -> to quit
:w -> to write
:qw -> to write and quite
:qw! -> to write and quite forcefully

h -> to move cursor left
j -> to move cursor down
k -> to move cursor up
L -> to move cursor down

x -> to delete a character
dw -> to delete a word
dd -> delete a line
 

heavydistortion

New Member
This has been a long term joke, but as an avid vim user, it's simple.

Once you open your file and edit it, to quit vi/vim, you simply:

Quit without saving:
ESC, then :q

If you ctrl-c, you'll create a swap file..

Quit with saving:
ESC, then :ZZ

Vim is really the ultimate editor.. learn to use it and you'll get a promotion at work ;)
Yeah, I've been using it for a long time and when the joke starting popping up everywhere, I was confused. I thought there was a new bug in vim, or may be it's not about something else altogether!
 

Members online



Top