diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 20:53:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 20:53:21 +1300 |
commit | beb3997ddb707a6e5371ea6864410675be3115d8 (patch) | |
tree | f8eb7efbce056b54918b03ee4750fc76d5e6b8aa | |
parent | Merge branch 'port/bsd/netbsd' (diff) | |
download | dotfiles-beb3997ddb707a6e5371ea6864410675be3115d8.tar.gz dotfiles-beb3997ddb707a6e5371ea6864410675be3115d8.zip |
Move .vimrc 'encoding' to beneath scriptencoding
The Vim :help for "scriptencoding" specifies:
> If you set the 'encoding' option in your .vimrc,
> :scriptencoding must be placed after that. E.g.:
> set encoding=utf-8
> scriptencoding utf-8
Also move it into the +multi_byte feature check, though this isn't too
important as the :help specifies that the command is ignored if that
feature is not available.
-rw-r--r-- | vim/vimrc | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,9 +1,12 @@ -" This file is UTF-8, of course -scriptencoding utf-8 - " Don't make any effort to be compatible with vi, use more sensible settings set nocompatible +" Use UTF-8 by default wherever possible, including in this file +if has('multi_byte') + set encoding=utf-8 + scriptencoding utf-8 +endif + " If our version isn't ancient and Pathogen is available, call it to load all " the plugins in .vim/bundle; these are saved as submodules if v:version >= 701 @@ -92,11 +95,6 @@ endif " happened to me but who knows, it might one day set fileformats+=mac -" Use UTF-8 by default wherever possible -if has('multi_byte') - set encoding=utf-8 -endif - " Adopt the indent of the last line on new lines; interestingly, plugins that " do clever things with indenting will often assume this is set set autoindent |