From b59099ac94dda5201e18b1cea23d781cc8e8511e Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sat, 27 May 2023 18:47:36 -0700 Subject: init.vim, better fencs --- home/xyz/.config/nvim/init.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'home/xyz/.config/nvim/init.vim') 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 -- cgit v1.2.3-70-g09d2