I use Vim in Screen. I run the command
vim <bigFolder>
I am in stuck, since it does not make sense to close each buffer by
:q
How can you close all active buffers in Vim, by one command inside Vim?
Very simply: use the :bd[elete] command. For example, :bd[elete] buf#1 buf#5 buf#3 will delete the buffers 1, 3, and 5.
Other ways to exit VimEsc + :x + Enter (Save and exit) Esc + :qa + Enter (Quit all open files) Esc + Shift ZZ (Save and exit) Esc + Shift ZQ (Exit without saving)
The :bufdo
command lets you execute a command on all buffers. In this case, you want to run :bufdo bdelete
to close all open buffers in one go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With