Skip to content

arp242/confirm_quit.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Packages

No packages published