I started Vi on my Ubuntu machine. However I don't know Vi, and now I can not quit. I see the editor and I can write text, at the bottom line there is a label "recording".
How do I quit from Vi?
|
I started Vi on my Ubuntu machine. However I don't know Vi, and now I can not quit. I see the editor and I can write text, at the bottom line there is a label "recording". How do I quit from Vi? |
|||||||||
|
|
vim is a modal editor. Hit the ESC key to get into Normal (command) mode then type :q and press Enter. To quit without saving any changes, type :q! and press Enter. See also Getting out in Vim documentation. |
|||||||||
|
|
The quit from the vi is another way is Esc :x. The option is used for save and quit at the same time. |
||||
|
|
|
I use ctrl+[ to generate the esc sequence, this keeps me from having to move my fingers from the home row (remember the esc key was in a different place when |
|||||
|
|
As Sinan said, vim is a modal editor. If you want to know whether that works for you you should maybe invest some time and run |
|||
|
|