I know I can use
:new to open a new buffer in a split window (defined by
set splitbelow and
But how can I just open a new, empty buffer without opening it in a split?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
You can use
Edit a new, unnamed buffer. This fails when changes have been made to the current buffer, unless 'hidden' is set or 'autowriteall' is set and the file can be written.
And you can use
:enew! to discard unsaved changes in the current buffer.