diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-05-27 18:47:36 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-05-27 18:47:36 -0700 |
commit | b59099ac94dda5201e18b1cea23d781cc8e8511e (patch) | |
tree | 778b3805a07fb4c00ca6477649c304e7d550f5d0 /home/xyz/.config/nvim | |
parent | 4a95a77cb096ba8c19b240321d4195ad79daa0d8 (diff) |
init.vim, better fencs
Diffstat (limited to 'home/xyz/.config/nvim')
-rw-r--r-- | home/xyz/.config/nvim/init.vim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim index 7bef3b6c..8c1f06f3 100644 --- a/home/xyz/.config/nvim/init.vim +++ b/home/xyz/.config/nvim/init.vim @@ -89,8 +89,14 @@ set shiftwidth=4 " number of spaces to use for autoindent "set expandtab " tabs are space " https://www.zhihu.com/question/22363620/answer/21199296 -" last line seems is default to neovim but not vim -set fileencodings=ucs-bom,utf-8,utf-16,gbk,big5,gb18030,latin1 +" euc-cn=gb2312, cp936=gbk +" it is recommended by `:h fileencodings` to put ucs-bom at first and latin1 at last +" based on my experience, if put utf-16 in front of euc-cn, euc-cn will have mojibake +" based on my experience, if put big5 in front of euc-cn and cp936, euc-cn will have mojibake +" according to zhihu comment, if put gb18030 in front of big5 , big5 will have mojibake +" according to wikipedia articles, euc-cn is preceded by cp936 which is preceded by gb18030, gb18030 is backward compatible with cp936 which seems is backward compatible with euc-cn +set fileencodings=ucs-bom,utf-8,euc-cn,cp936,big5,gb18030,utf-16,latin1 +" seems is default to neovim but not vim set encoding=utf-8 " some file on win10 display as unix but is dos |