Are you stuck in vim and cannot exit?
Vim is a powerful text editor, but if you are new to vim it may seem very confusing.
Personally I use the command
ZZ to exit. This saves the file and exists. I use this all the time because what is simpler than pressing
Vim works using commands. Before you enter a command, hit the
You can exit without saving your changes with
:q!. This is useful if you accidentally modified a file you didn't want to.
If you don't want to quit without saving, instead use
:qto quit (short for :quit)
:q!to quit without saving (short for :quit!)
:wqto write and quit
:xto write and quit (similar to :wq)
:exitto write and exit (same as :x)
Vim is a program that gives me the ability to edit text files, and it has a ton of features. If you are new to vim, I recommend this course
Vim is a text editor. It’s been around for a long time and has an avid community of users.
- Vim does not require a mouse. This makes it incredibly efficient for editing text files that just contain text or code, increasing your productivity.
- Vim can be used remotely over SSH, in the shell or inside an IDE. Personally I use vim inside visual studio code.
Vim has been around for more than 30 years and it hasn’t changed its philosophy. Learn vim once and you can use it for years.
I've used several IDEs through my career and having to learn shortcuts only once saved me tons of time.
Vim is an editor for everyone and not just programmers. It simply does its job with minimal set of commands.