aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-11-12 21:34:26 -0500
committerTeddy Wing2015-11-12 21:39:02 -0500
commit52b06b3938776ad304043221572497e9368e40b6 (patch)
tree8319f391876b564ab27d82daf13f2a33e51409df
parentf313554c25a6b6cf6044bd6fb3038f484d1507d3 (diff)
downloaddotvim-52b06b3938776ad304043221572497e9368e40b6.tar.bz2
vimrc: Output `scrollbind` value with <leader>sb
Since our `<leader>sb` mapping is a toggle command for `scrollbind`, it can be hard to know whether it's on or off after invoking it if you haven't been paying attention. Output `setl scrollbind?` after performing the toggle so that the current `scrollbind` value displays in the command line area to make it clear what happened.
-rw-r--r--vimrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index fc73fa7..2daca81 100644
--- a/vimrc
+++ b/vimrc
@@ -340,6 +340,10 @@
" 2015.10.28:
" * Add a mapping to open the current file in Chrome
"
+" 2015.11.12:
+" * Output current scrollbind value after using our <leader>sb scrollbind
+" toggle mapping.
+"
" Pathogen
@@ -625,7 +629,7 @@ nnoremap ]q :cnext<cr>
nnoremap [q :cprevious<cr>
" Set scrollbind on a window
-nnoremap <leader>sb :setlocal scrollbind!<cr>
+nnoremap <leader>sb :setlocal scrollbind! scrollbind?<cr>
" Copy to OS X clipboard from visual mode
" http://stackoverflow.com/a/17126375