aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-06 14:51:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-06 14:51:41 -0300
commit6ff8481c7e6ee05c353ac46f11be85d877a0eb8e (patch)
treed6d37880b4c82ea40cffe7e929cff57eeed0e333
parentd7b8ce234b78db0049e087fbca3d5b2df65abecb (diff)
downloadvim-6ff8481c7e6ee05c353ac46f11be85d877a0eb8e.tar.gz
vim-6ff8481c7e6ee05c353ac46f11be85d877a0eb8e.tar.bz2
Change some key maps to avoid conflicts
-rw-r--r--vimrc.dot.link22
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>