I'm kind of new to VIM, I'd like to know the difference between the :close
window command and the :hide
window command. I've read the docs but they both seem to do the about same...
:clo[se][!]
Can:
fail when there is only one window on the screen.
:set hidden
.
use [!] to exit the current session without saving it (i.e. :clo[se]!
).
Can't
:hid[e]
Can't
fail when there is only one window on the screen.
:set hidden
(irrelevant).
use [!] to exit the curent session without saving it.
Can:
:hid[e] {cmd}
). This side command executes {cmd}
with :set hidden
. After execution of {cmd}
, the previous value of :set hidden
is restored. For example, :hide edit example
will edit example
and hide the current buffer if it has any changes.
(Referenced from :help close
and :help hide
from $vim
)
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