From 92c703ee68bf96015d31c143207007fda54a824c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 Jun 2018 22:35:39 +1200 Subject: 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. --- vim/vimrc | 12 ++++-------- 1 file 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 l :set list! list? -" Don't show line numbers by default, but \n toggles them -set nonumber +" \n toggles line numbers nnoremap n :set number! number? " 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 s :setlocal spell! spell? " 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 w :set wrap! wrap? -- cgit v1.2.3