]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
Change some key maps to avoid conflicts
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 17:51:41 +0000 (14:51 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 17:51:41 +0000 (14:51 -0300)
vimrc.dot.link

index 2f9b16209b62d6f0756ace5ebed1dabb9a28e6b6..54806ee40a9d6117a6253850a403ea7c80387bd3 100644 (file)
@@ -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 \eq :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 \eq :wqa <CR>
+map \ec :wqa <CR>
 map \ef :wq <CR>
-map \ec :tabclose <CR>
+"map \ec :tabclose <CR>
+map \ee :tabclose <CR>
 map \em :q! <CR>
 map \ew :w <CR>