aboutsummaryrefslogtreecommitdiff
path: root/vim/config/list.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-30 23:47:33 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-30 23:49:45 +1300
commit92f2c78524d1e446aa2ab08b12b54a56dfbbbd26 (patch)
tree57d0aee3424ef87e5794168cab341c9be6fc34a3 /vim/config/list.vim
parentToggle Vim 'hlsearch' and 'incsearch' locally (diff)
downloaddotfiles-92f2c78524d1e446aa2ab08b12b54a56dfbbbd26.tar.gz
dotfiles-92f2c78524d1e446aa2ab08b12b54a56dfbbbd26.zip
Show Vim option values after leader-key toggle
Using the very weird syntax: :setlocal option! option? We can toggle the option and print its new value in the same line. For the line breaking options, we only show the value of the 'linebreak' option, because otherwise we print three lines of messages, which requires an <Enter> press, even if we put all three `option?` calls on one :setlocal line.
Diffstat (limited to 'vim/config/list.vim')
-rw-r--r--vim/config/list.vim3
1 files changed, 1 insertions, 2 deletions
diff --git a/vim/config/list.vim b/vim/config/list.vim
index 87e80005..faf5e29a 100644
--- a/vim/config/list.vim
+++ b/vim/config/list.vim
@@ -1,9 +1,8 @@
" Don't show whitespace characters or end-of-line characters visually by
" default, but make \l toggle between them
set nolist
-nnoremap <leader>l :setlocal list!<CR>
+nnoremap <leader>l :setlocal list! list?<CR>
" Clearly show when the start or end of the row does not correspond to the
" start and end of the line
set listchars+=precedes:<,extends:>
-