aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-06-26 13:24:55 -0400
committerTeddy Wing2014-06-26 13:24:55 -0400
commit5c8ac3cf5463c21902277e6cb21aec60384da0b6 (patch)
treef99332e112933748aa76f5dc8ce025d653cf27de /vimrc
parent72d16c8035cd6f6ca34058c350cb037c66581f87 (diff)
downloaddotvim-5c8ac3cf5463c21902277e6cb21aec60384da0b6.tar.bz2
vimrc: update <c-h> mapping to reselect selection
The visual selection would get dropped after saving using <c-h> from visual mode. Ensure that we're brought back to were we started before save.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index b595a16..142921e 100644
--- a/vimrc
+++ b/vimrc
@@ -218,6 +218,10 @@
" have to do this and typing :co<Tab><Tab><Tab><CR> multiple times a
" day adds up.
"
+" 2014.06.26:
+" * Update <c-h> save mapping in visual mode to reselect the last
+" selected area
+"
" Pathogen
@@ -452,7 +456,7 @@ vnoremap <S-Tab> <Esc>
" across modes, and because bash by default doesn't let me map Control-s)
nnoremap <c-h> <esc>:update<cr>
inoremap <c-h> <c-g>u<esc>:update<cr>a
-vnoremap <c-h> <esc>:update<cr>v
+vnoremap <c-h> <esc>:update<cr>gv
" Preserve indentation on empty lines
" http://stackoverflow.com/a/7413117