Created
July 8, 2015 05:51
-
-
Save DanielFGray/3bf4849c2dee962f91ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! PromptQuit() | |
echo 'close current buffer?' | |
if nr2char(getchar())=~'y' | |
silent execute "normal \<esc>:Sayonara!\<cr>" | |
elseif nr2char(getchar())=~'Y' | |
silent execute "normal \<esc>:Sayonara\<cr>" | |
endif | |
silent! redraw! | |
endfunction | |
nnoremap <silent> Q <Esc>:call PromptQuit()<CR> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment