Vim does: helps to have special window behavior?

Disclaimer: Vim n00b. If one of my assumptions is incorrect here, correct me.

When I use :helpin Vim, a new window opens with help information. Usually, if I have two windows and close one of them, the other assumes the full height of the screen. This also happens when I close the help window - the original window resumes its full height. However, when I close the original window, Vim closes completely. This is probably the behavior that we would like, but it seems to be different from the norm. Are certain windows special so as not to stick together when other windows close? What are the rules for this behavior?

+4
source share
1 answer

Buffers (which contain normal files that you are editing) are there :help special-buffers. One of them help, recognized :setlocal buftype?, giving help.

Vim has a special logic when :quiting / :closeadds another buffer, and only the help buffer remains: the help buffer also closes automatically, and therefore Vim deletes the current tab / leaves the current Vim session altogether.

+2
source

Source: https://habr.com/ru/post/1669245/


All Articles