You are using vim and are in editor mode Youve finished edit

You are using vim and are in editor mode. You\'ve finished editing the file and want to save the changes and leave vim. What keys (in order) will allow you to do this? You are using vim and are in editor mode. You\'ve finished editing the file and realize you messed up royally. You want to vim without saving the changes. What keys (in order) will allow you to do this?

Solution

VIM is a Unix based text editor which has three modes command mode , input mode and ex mode. Now to open a new file we have to type following command in the terminal-

$ vi YourTextName.txt

Now to save the file and to save the changes I made we have to use any of the following commands-

:x

OR

:x!

OR

:wq

This will save the file and also save the changes that I have made and quit the vim text editor.

Now if we want to save the file without saving the changes that I had made then we can use the follwing command-

:q!

After giving this command to the terminal it will quit vim without saving the changes that I had made.

 You are using vim and are in editor mode. You\'ve finished editing the file and want to save the changes and leave vim. What keys (in order) will allow you to

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site