1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 # 首先切換到 root cd /root # 查看 root 自身用的是什 shell language cat /etc/passwd # 因為這裡我用的是 csh,所以就用 ee 指令來編輯 ee .cshrc # 在 .cshrc 最下面加入 setenv LC_ALL zh_TW.UTF-8 setenv LANG zh_TW.UTF-8 setenv CLICOLOR set color # 最後 putty 設定 Windows > Translation > charset > 設為 UTF-8 Windows > Appreance > FontSettings > 設定為支援 BIG5 的字體 (應該用預設的就可以了) # 如果用 pietty 的只需要 選項 > 字元編碼 >Unicode UTF-8 # 最後再來安裝 vim 編輯器 cd /usr/ports/editors/vim make install && make install clean ### 不過在安裝 vim 時遇到了一些依賴 library 版本太低需要升級 # 所需切換到 xextproto,接著解除安裝,再重新安裝 cd /usr/ports/x11/xextproto make deinstall make install # 再切回 vim port 安裝,發現 inputproto 版本也過低,步驟同上來升級 cd /usr/ports/x11/inputproto make deinstall make install # 又再回到 vim port 安裝,發現 X11 版本太低了,步驟同上再升級 cd /usr/ports/x11/libX11 make install # 在安裝 libX11 時他的依賴版本 xorg-macro 也太低,同步 cd /usr/ports/devel/xorg-macros make deinstall make install # 最後回到 libX11 再次 cd /usr/ports/x11/libX11 make deinstall make install # 最後就是安裝 vim 就應該成功了
記錄一下基本的 .vimrc 如果放在 /usr/home/vimrc 下則為全部用戶共用 如果要獨立用戶則只需要放在 /usr/home/[user]/.vimrc 則可
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 set ruler set number set hlsearch set incsearch set nocompatible set backspace=start,indent,eol set cin set tabstop=4 set shiftwidth=4 set smartindent set autoindent set showmatch set cursorline set fileencodings=utf-8,ucs-bom set termencoding=utf-8,ucs-bom set encoding=utf-8 set history=400 set ignorecase set nobackup syntax on behave mswin
參考: http://blog.tshes.tcc.edu.tw/post/1/681