How do I create a new empty buffer?
:enew
The :enew command creates a new unnamed empty buffer in the current window.
254 results for ":split"
:enew
The :enew command creates a new unnamed empty buffer in the current window.
:set switchbuf=useopen,usetab
By default, Vim opens a new window (or reloads the buffer in the current window) whenever you navigate to a quickfix entry, tag, or :buffer command — even if
:tab sb N
How it works The :tab sb N command opens buffer number N in a brand new tab page.
:tabdo only
When you are deep in a refactor, each tab can accumulate helper splits, previews, and temporary views.
buffers-windows #buffers #windows #tabs #ex-commands #workflow
:Gdiffsplit HEAD~1
vim-fugitive's :Gdiffsplit opens a vertical split showing the current file diff against any git revision — not just HEAD.
:bp | bd #
The :bp bd # command switches to the previous buffer and then deletes the alternate buffer.
"#p or <C-r># in insert mode
The # register always contains the name of the alternate file — typically the file you were editing just before the current one.
<C-w>H / <C-w>J / <C-w>K / <C-w>L
The H, J, K, and L commands move the current window to the far left, bottom, top, or right of the screen respectively, rearranging your entire split layout.
buffers-windows #windows #buffers #navigation #splits #layout
<C-w>H
The H command moves the current window to the far left, making it a full-height vertical split.
:Explore / :Vexplore / :Sexplore
Vim ships with netrw, a built-in file explorer that lets you browse directories, open files, create new files, rename, and delete — all without plugins.
buffers-windows #navigation #buffers #file-management #netrw #productivity
:set winbar=%f
Neovim 0.
:drop {file}
When the same file is already open elsewhere, using :edit can create extra navigation friction because you stay in the current window and may lose layout contex
buffers-windows #buffers-windows #windows #buffers #workflow
:terminal
The :terminal command opens an interactive terminal emulator directly inside a Vim window.
:Git blame
The vim-fugitive plugin by Tim Pope provides a powerful interactive :Git blame that goes far beyond the basic command-line git blame.
set completeopt+=popup
Adding popup to completeopt makes Vim display extra information — such as function signatures or documentation — for the currently highlighted completion it
:set splitright splitbelow
By default, :split opens a new window above the current one and :vsplit opens to the left — the opposite of most modern IDEs and editors.
:diffsplit {file}
:diffsplit {file} opens a file in a horizontal split and immediately activates diff mode, highlighting the differences between both buffers.
:wincmd
:wincmd {key} executes any {key} window command from the Ex command line or from inside a Vimscript function.
let g:netrw_liststyle=3 and let g:netrw_banner=0
How it works Vim ships with a built-in file explorer called netrw that you can access with :Explore (or :Ex).
:set winfixbuf
Neovim's winfixbuf option (added in Neovim 0.