aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-20 22:35:39 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-20 22:35:39 +1200
commit92c703ee68bf96015d31c143207007fda54a824c (patch)
treeb5a260e81b1e5a504ad474a3cebee1c5680fadba
parentea7aba37737c13244c542e2e79bf337365457a7b (diff)
downloaddotfiles-92c703ee68bf96015d31c143207007fda54a824c.tar.gz
Simplify boolean toggle options in .vimrc
'list', 'number', and 'spell' all default to off with a .vimrc, so they don't need to be set and can just have the mapping.
-rw-r--r--vim/vimrc12
1 files changed, 4 insertions, 8 deletions
diff --git a/vim/vimrc b/vim/vimrc
index a836038f..65a88dc4 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -120,13 +120,10 @@ set shortmess+=T " Truncate other message in midle if too long
set shortmess+=w " written -> [w], appended -> [a]
set shortmess+=x " [dos format] -> [dos]
-" Don't show whitespace characters or end-of-line characters visually by
-" default, but make \l toggle between them
-set nolist
+" \l toggles showing tab, end-of-line, and trailing whitespace
nnoremap <Leader>l :<C-U>set list! list?<CR>
-" Don't show line numbers by default, but \n toggles them
-set nonumber
+" \n toggles line numbers
nnoremap <Leader>n :<C-U>set number! number?<CR>
" Use all ancestors of current directory for :find
@@ -203,8 +200,7 @@ endif
" Configure spell checking features, if available
if has('spell')
- " Don't check spelling by default, but bind \s to toggle this
- set nospell
+ " \s toggles spell checking
nnoremap <Leader>s :<C-U>setlocal spell! spell?<CR>
" Use New Zealand English for spelling by default (it's almost identical
@@ -331,7 +327,7 @@ if has('windows')
endif
-" Don't wrap by default, but use \w to toggle it on or off quickly
+" Don't wrap by default, but use \w to toggle it on or off
set nowrap
nnoremap <Leader>w :<C-U>set wrap! wrap?<CR>