aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-10 00:19:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-10 00:19:01 +1200
commitea2f138e73cd645d2850d79dac346d8b64a53c25 (patch)
tree2167358e49d8ff1750d1c692efa50c9f1fa4455c
parentMerge branch 'release/v5.27.0' into develop (diff)
downloaddotfiles-ea2f138e73cd645d2850d79dac346d8b64a53c25.tar.gz
dotfiles-ea2f138e73cd645d2850d79dac346d8b64a53c25.zip
Use Unicode characters for 'lcs' extends/precedes
-rw-r--r--vim/vimrc17
1 files changed, 15 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index e431e38e..e23b10b3 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -616,8 +616,21 @@ set listchars+=nbsp:+ " Non-breaking spaces
" These two are actually somewhat misplaced, in that they don't represent
" characters, but the line wrap state. They're useful, though.
"
-set listchars+=extends:> " Unwrapped text to screen right
-set listchars+=precedes:< " Unwrapped text to screen left
+" If the current encoding supports it, use these characters for the markers,
+" as they're visually distinctive:
+"
+" extends: Signals presence of unwrapped text to screen right
+" » U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+" precedes: Signals presence of unwrapped text to screen left
+" « U+00BB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+"
+" Failing that, '<' and '>' will do fine.
+"
+if has('multi_byte_encoding')
+ set listchars+=extends:» listchars+=precedes:«
+else
+ set listchars+=extends:> listchars+=precedes:<
+endif
" Don't let your editor's options be configured by content in arbitrary files!
" Down with modelines! Purge them from your files!