Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 

This project is considered stable

Ask for confirmation before quitting Vim.

I originally wrote this as an answer on vi Stack Exchange.

The idea is based on the "ConfirmQuit" script.

To use it you'll need to remap keys that "quit" Vim as there's no other way to prevent Vim from quitting. This plugin comes with the following mappings by default:

cnoremap <silent> q<CR>  :call confirm_quit#confirm(0, 'last')<CR>
cnoremap <silent> wq<CR> :call confirm_quit#confirm(1, 'last')<CR>
cnoremap <silent> x<CR>  :call confirm_quit#confirm(1, 'last')<CR>
nnoremap <silent> ZZ     :call confirm_quit#confirm(1, 'last')<CR>

See :help confirm-quit for the full documentation.

About

Ask for confirmation before quitting Vim.

Topics

Resources

License

Packages

No packages published