diff options
-rw-r--r-- | vimrc.dot.link | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/vimrc.dot.link b/vimrc.dot.link index 2f9b162..54806ee 100644 --- a/vimrc.dot.link +++ b/vimrc.dot.link @@ -105,9 +105,27 @@ let g:syntastic_mode_map={ 'mode': 'passive', nmap <ESC>n :tabnew<CR> " Write, quit and close shortcuts using Alt-key combos -map q :wqa <CR> +" +" Keys were chosen not to conflict of to be close to window manager combos +" Like Awesome has a combo (Meta-q) which could be confused with a VIM quit +" mapping (Alt-q). +" +" Other keys were chosen not to conflict with existing VIM functionality +" like Alt-t (OpenNerdTree). +" +" While we could try to map other meta keys like Menu or AltGr, this +" is currently not supported by VIM and could even cause more confusion with +" other applications. +" +" For the quit combo, an approach like listening to VimLeave would work if +" this event would be triggered by the window manager when killing VIM window, +" but this does not seem to be the case. Anyway there's interesting discussion at +" https://stackoverflow.com/questions/5142099/how-to-auto-save-vim-session-on-quit-and-auto-reload-on-start-including-split-wi +"map q :wqa <CR> +map c :wqa <CR> map f :wq <CR> -map c :tabclose <CR> +"map c :tabclose <CR> +map e :tabclose <CR> map m :q! <CR> map w :w <CR> |