Skip to content

A vim plugin allowing you to close any type of window with a single function

License

Notifications You must be signed in to change notification settings

bradurani/vim-powerclose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-powerclose

A vim plugin allowing you to close any type of window with a single function

vim-powerclose provides a single function called powerclose#close

It is able to close the following:

  • a buffer, saving first if it is unsaved (:w :bd)
  • a new empty buffer (:bd!)
  • a readonly buffer (:bd!)
  • a neovim terminal (:bd!)
  • the command window (<c-c><c-c>)

It intentionally will not close a new buffer that has content in it

Mapping

vim-powerclose does not map any keys by default. To use it you will need to create a mapping such as:

nnoremap <leader>q :call powerclose#close()<CR>

Installing

Works with any plugin manager. For vim-plug, my favorite plugin manager, Just add this to your .vimrc

Plug 'bradurani/vim-powerclose'

Contributing

Just open a pull request 🤗. Report issues on the issues page.

About

A vim plugin allowing you to close any type of window with a single function

Resources

License

Stars

Watchers

Forks

Packages

No packages published