A common quandary for those just getting started with the Vim text editor is how to exit out of it once started.
To exit Vim:
- If you are in edit mode (meaning Vim is allowing you to type words), first press the esc key.
- Then enter
:wq
+ return to save and exit.
To exit without saving, you can run :q!
+ return
Top comments (4)
The first time I used Vim,
I used the top-right close button with my mouse. lol
I always wanted to ask.
Why do people use Vim over Nano?
I mean both are CLI text editors and Nano is much easier
Nano is not as ubiquitous as Vim.
If you know Vim, you can be thrown into whatever (linux) server and know your way around.
If you ssh into a remote server to make a necessary change, you'll always find Vim but not always Nano.
Vim is like a language on itself. Once you learn the language, a whole world opens and you can become exponentially more productive writing (not just) code.
With Nano you're limited to how the program works.
With Vim you can go a long way customizing it to suit your needs.
I could go on but I think those are enough reasons as to why people prefer one over the other.
Thanks, Man it was really helpful🙌🏽