From e2bed57b6ae33a67e3e73bc1e9169a43662a4b15 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sun, 25 Aug 2013 16:05:37 -0500 Subject: [PATCH] .vimrc: Add list-whitespace-chars toggle Add ws for toggling list-mode -- showing unprintable chars like trailing white-space and hard-tabs. Other changes: * Use ":set {{flag}}!" syntax for toggling boolean variables rather than ":set inv{{flag}}" syntax. * Simplify strip-trailing-whitespace helper. --- .vimrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.vimrc b/.vimrc index fb6e632..280f476 100644 --- a/.vimrc +++ b/.vimrc @@ -175,7 +175,7 @@ let mapleader = "," nnoremap :nohlsearch:echo " to pastetoggle, to turn-off autoindent when pasting from system clipboard -nnoremap :set invpaste paste? +nnoremap :set paste! paste? set pastetoggle= " to toggle NERDTreee @@ -249,7 +249,10 @@ nmap L mQgewvu`Q nmap cd :lcd %:h " set text wrapping toggles -nmap tw :set invwrap:set wrap? +nmap tw :set wrap! wrap? + +" set list-whitespace-chars toggle +nmap ws :set list! list? " find merge conflict markers nmap fc /\v^[<=>]{7}( .*\|$) @@ -258,10 +261,7 @@ nmap fc /\v^[<=>]{7}( .*\|$) nmap hs :set hlsearch! hlsearch? " strip all trailing whitespace in file -function! StripWhitespace () - exec ':%s/ \+$//gc' -endfunction -map s :call StripWhitespace () +nmap s :%s/\s\+$// " toggle diffmode for a buffer function! DiffToggle() -- 2.45.2