Skip to content

Provides a vim command to close the current buffer and replace it with another existing buffer, or a new file if the buffer deleted was the last one listed.

Notifications You must be signed in to change notification settings

ConnorKrammer/vim-bufferclose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

vim-bufferclose

Provides a vim command to close the current buffer and replace it with another existing buffer, or a new file if the buffer deleted was the last one listed.

Call the command with :Kwbd, or remap it to <leader>kb (mneumonic: kill buffer) with something like the following:

:nnoremap <leader>kb! Kwbd

Calling the command with the ! argument will close the current buffer whether you've saved it or not.

This script is originally from http://vim.wikia.com/wiki/VimTip165.

About

Provides a vim command to close the current buffer and replace it with another existing buffer, or a new file if the buffer deleted was the last one listed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published