I'm a beginner in vim and I've a simple question.
What is the difference between :q and :bd command when we have many buffers ?
Thank you for your answers.
A buffer is a temporary space in the memory to store your opened file(s). Each time you open a file, Vim stores it in a buffer; if you open 5 files, you have 5 buffers. A buffer remains "opened" even if that file is not visible (the buffer is hidden).
:q
quit current window.
:ls
:bd (without argument)
delete(unload) current buffer
you can test it with :ls
to monitor the buffer changes.
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