From 6ff8481c7e6ee05c353ac46f11be85d877a0eb8e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 6 Oct 2017 14:51:41 -0300 Subject: Change some key maps to avoid conflicts --- vimrc.dot.link | 22 ++++++++++++++++++++-- 1 file 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 n :tabnew " Write, quit and close shortcuts using Alt-key combos -map q :wqa +" +" 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 +map c :wqa map f :wq -map c :tabclose +"map c :tabclose +map e :tabclose map m :q! map w :w -- cgit v1.2.3