From b46d172e025e9126620576d8a9368e51d6ec59d2 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 23 Nov 2017 22:27:08 +0000 Subject: [PATCH] Extend enabled listchars, enable showbreak --- plugin/settings.vim | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/plugin/settings.vim b/plugin/settings.vim index dba20e1..cac65f4 100644 --- a/plugin/settings.vim +++ b/plugin/settings.vim @@ -5,8 +5,36 @@ set mouse=a " Enable visually highlighting listchars set list -" Set visible chars for trailing white space and tabs -set listchars=trail:·,tab:»» +" Non breaking space: +" * Circled Reverse Solidus (U+29B8, utf-8: E2 A6 B8) +set listchars=nbsp:⦸ +" Trailing space: +" * Middle Dot (U+00B7, utf-8: C2 B7) +set listchars+=trail:· +" Tab stop: +" * White Right-Pointing Small Triangle (U+25B9, utf-8: E2 96 B9) +" * Box Drawings Light Triple Dash Horizontal (U+2504, utf-8: E2 94 84) +set listchars+=tab:▹┄ +" Line extended beyond screen when nowrap: +" * Right-Pointing Double Angle Quotation Mark (U+00BB, utf-8: C2 BB) +set listchars+=extends:» +" Line preceded beyond screen when nowrap: +" * Left-Pointing Double Angle Quotation Mark (U+00AB, utf-8: C2 AB) +set listchars+=precedes:« + +" Wrap lines which are longer than screen width +set wrap +if has('linebreak') + " Break wrapped lines at a character in breakat + set linebreak + " Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3) + let &showbreak='↳ ' + " Use same highlight group as listchars for showbreak + set highlight+=@:SpecialKey +endif + +" Don't add 2 spaces after end of sentence +set nojoinspaces " TODO: spellcapcheck " TODO: virtualedit=block @@ -40,15 +68,6 @@ if has('writebackup') set nowritebackup endif -" Wrap to whole words -set wrap -if has('linebreak') - set linebreak -endif - -" Don't add 2 spaces after end of sentence -set nojoinspaces - " Use Unix as standard file type set fileformats=unix,mac,dos