Easily Quit Vim/Vi Without Saving Changes Command


Quit Vim/Vi Without Saving Changes Command

Vim is one of the popular text editors among the software developers & system administrators. The macOS as well as on different Linux Distros Vim comes preinstalled. In this tutorial, you are going to learn How to Quit Vim/Vi Without Saving Changes Command.

Quit Vim Without Saving Changes Command

Follow below instructions to Quit Vim:
1. If you are in any other mode, then press Esc to come in normal mode.
2. Now enter the following command in Vim:

:q!

3. Finally hit the Enter key.

Example of Quit Vim Without Saving Command

First, open the file in Vim using the following command:

vim filename.extension

Now press Esc to come in normal mode.

Then enter the following command to quit the editor without saving changes:

:q!

Now press Enter to exit the editor.

"Easily

Conclusion

In this tutorial, you have learned how to Easily Quit Vim/Vi Without Saving Changes Command. If You have any queries regarding this please comment below.