aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2016-06-29 10:48:54 +0200
committerMiquel Sabaté Solà <msabate@suse.com>2016-06-29 10:48:54 +0200
commit886c74a210d0ca5f04fa4010fddfc51171d1d9ce (patch)
treeba44882b808fc68b2a01224fa6b9a208db87ce3d
parent0ea8d84804cc5b2989ef67a78bf345909c5b3510 (diff)
downloaddotfiles-886c74a210d0ca5f04fa4010fddfc51171d1d9ce.tar.gz
dotfiles-886c74a210d0ca5f04fa4010fddfc51171d1d9ce.zip
vim: use <C-z> as an escape too
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
-rw-r--r--vimrc13
1 files changed, 9 insertions, 4 deletions
diff --git a/vimrc b/vimrc
index 3a120e1..18c6b4e 100644
--- a/vimrc
+++ b/vimrc
@@ -149,10 +149,15 @@ nnoremap <C-q> @q
" Pressing ^ in order to move to the first non-blank character is inconvenient.
nnoremap <leader>, ^
-" Do nothing when <C-z> is pressed. Why would I want to stop the current `vim`
-" process ? (especially shitty if you miss useful commands like <C-x> ...).
-nnoremap <C-z> <nop>
-inoremap <C-z> <nop>
+" The default behavior for <C-z> is simply useless: why would I want to stop
+" the current `vim` process ? (especially shitty if you miss useful commands
+" like <C-x> ...).
+"
+" Before I was remapping this to <nop>, but since switching to Emacs, I've
+" started to use <C-z> as escape there in order to not overlap with an
+" extremely used prefix. For consistency's sake, I'm also applying this to Vim.
+nnoremap <C-z> <ESC>
+inoremap <C-z> <ESC>
" Do nothing for the <S-K> command. I never use it and it appears when I
" misstype <S-J>.