Questions tagged [quit]

Use this tag for questions about exiting vim.

Filter by
Sorted by
Tagged with
30 votes
5 answers
15k views

How do I close Vim externally?

Let's say I have a X11 server that's hanging, keeping me from saving the work from the XTerm Vim session that X11 server controls. (Not GVim, just regular Vim-in-XTerm.) Is there a way that I could (...
DevSolar's user avatar
  • 789
20 votes
2 answers
7k views

How to exit Vim from split mode?

How to efficiently exit Vim when editing multiple files in the split mode at one go? It seems when I'm having e.g. 10 split windows, I've to repeat 10 times :q! command for each window which is a bit ...
kenorb's user avatar
  • 18k
66 votes
2 answers
55k views

What are the differences between :wq<cr> :x<cr> and ZZ when exiting vim?

Vi and Vim, as all of you know, have many synonyms. There are three ways I know of to save the file and exit Vim and Vi. These are :wq <cr>, :x <cr> and ZZ. I have heard that these are ...
wefwefa3's user avatar
  • 1,143
40 votes
5 answers
5k views

Terminal borked after invoking Vim with xargs

I've sometimes tried invoking Vim using xargs, like this: find . -name '*.java' | xargs vim … which kind of works: As Vim launches, I see the following warning flash briefly: Vim: Warning: Input ...
200_success's user avatar
  • 9,339
31 votes
2 answers
5k views

What's the difference between "quit" and "abort"?

When I try to open a file from multiple vim instances, I get an error with several options: Swap file "~/.vim/tmp/file.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:...
Kevin's user avatar
  • 611
20 votes
3 answers
15k views

Cannot exit Vim even using q!

I cannot exit vim even when I type :q!. I get the error E37: No write since last change (add ! to override) E162: No write since last change for buffer... I think the buffer is a NetrwTreeListing ...
Tyler Durden's user avatar
  • 2,051