From 92f2c78524d1e446aa2ab08b12b54a56dfbbbd26 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 30 Oct 2017 23:47:33 +1300 Subject: 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 press, even if we put all three `option?` calls on one :setlocal line. --- vim/config/spell.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vim/config/spell.vim') diff --git a/vim/config/spell.vim b/vim/config/spell.vim index c34a6cc3..046b50ff 100644 --- a/vim/config/spell.vim +++ b/vim/config/spell.vim @@ -3,12 +3,12 @@ if has('spell') " Don't check spelling by default, but bind \s to toggle this set nospell - nnoremap s :setlocal spell! + nnoremap s :setlocal spell! spell? " Use New Zealand English for spelling by default (it's almost identical " to British English), but bind \u to switch to US English and \z to " switch back set spelllang=en_nz - nnoremap u :setlocal spelllang=en_us - nnoremap z :setlocal spelllang=en_nz + nnoremap u :setlocal spelllang=en_us spelllang? + nnoremap z :setlocal spelllang=en_nz spelllang? endif -- cgit v1.2.3