diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-18 20:29:01 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-18 20:29:01 +1200 |
commit | 5d2f419f6572250b6c7b2ad495c69bb6ad1e6171 (patch) | |
tree | b9ae533eeb676199b206d53aacdca67ae67064f7 | |
parent | Merge branch 'release/v6.28.0' into develop (diff) | |
download | dotfiles-5d2f419f6572250b6c7b2ad495c69bb6ad1e6171.tar.gz dotfiles-5d2f419f6572250b6c7b2ad495c69bb6ad1e6171.zip |
Extend default 'encoding' check in vimrc
-rw-r--r-- | vim/vimrc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -41,9 +41,10 @@ " to a multibyte (UTF-8) locale. This informs Vim's choice of internal " character encoding, but the default for the 'encoding' option in LANG's " absence is "latin1". Nowadays, this is never what I want, so we'll manually -" choose "utf-8" as an encoding instead if LANG is not defined. +" choose "utf-8" as an encoding instead if the encoding is the default +" 'latin1', and LANG is not defined. " -if !exists('$LANG') +if &encoding ==# 'latin1' && !exists('$LANG') set encoding=utf-8 endif scriptencoding utf-8 |