close

:echo $MYVIMRC

:view $VIM/_vimrc

EDIT my vimrc then saveas myhome

UTF-8 SET

set fileencodings=utf-8,big5,euc-jp,gbk,euc-kr,utf-bom,iso8859-1
set encoding=utf-8
set tenc=utf-8
set fileencoding=utf-8

Menu UTF-8 SET

source $VIMRUNTIME/delmenu.vim
language messages zh_TW.utf-8


:saveas $HOME/_vimrc

 

Vim 去除檔案結尾的^M

:%s/^M//g
(記得^M要用
CTRL-V CTRL-M來輸入)
或者是
:%s/\r//g

 

回到上次編輯離開的地方

au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif中文編碼判斷

 


if has("multi_byte")
        set encoding=utf-8
        setglobal fileencoding=big5
        set fileencoding=big5
        set bomb
        set termencoding=big5
        set fileencodings=ucs-bom,big5,utf-8,latin1
        set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
        set guifontwide=-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1
else
        echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 James Wu 的頭像
    James Wu

    James's Privacy Corner

    James Wu 發表在 痞客邦 留言(0) 人氣()