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>