aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-18 21:31:22 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-18 21:31:31 +1200
commit8535014902728c8856997e207f9c9fda6030a097 (patch)
treec122bfefdb5d9b214d9d955f0cd43fb004628f31
parentInterfere more specifically with 'path' (diff)
downloaddotfiles-8535014902728c8856997e207f9c9fda6030a097.tar.gz
dotfiles-8535014902728c8856997e207f9c9fda6030a097.zip
Set UTF-8 default 'encoding'
-rw-r--r--vim/vimrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 93e84dc8..ec997e02 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -80,6 +80,11 @@ else
set display=lastline " Just let it run off the screen if not
endif
+" If $LANG isn't set and 'encoding' is the default, use UTF-8
+if has('multi_byte') && !exists('$LANG') && &encoding ==# 'latin1'
+ set encoding=utf-8
+endif
+
" Don't wait for a key after Escape in insert mode
if exists('+esckeys') " Not in Neovim
set noesckeys