[VIM] 目前設定

編輯  _vimrc
——————————
set nocompatible
syntax on
behave xterm
set autoindent
set nu
set shiftwidth=4
set selectmode=mouse
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,gbk,big5,utf8
set ffs=unix,dos
set ff=unix
set encoding=utf-8
set termencoding=utf-8
map <F3> :set cursorline!<CR><Bar>:echo "Highlight active cursor line: " . /
          strpart("Off    On", 3 * &cursorline, 3)<CR>
if &background== "light"
  highlight comment ctermfg=darkgreen guifg=darkgreen
else
  highlight comment ctermfg=green guifg=green
endif
nmap l <End>
highlight SpellErrors ctermfg=Red guifg=Red cterm=underline gui=underline  /
                      term=reverse

set nocompatible
" 叫vim不要使用與vi兼容的模式, 否則很多 vim 的新功能就不能使用
syntax on
" 語法高亮度顯示
behave xterm
" 採用 xterm 的滑鼠移動設定
" 請參閱 http://dev.csdn.net/article/73778.shtm
" 應該是在 GUI 底下才有用 console 底下應該沒用吧…
set autoindent
" 啟用自動縮排
set nu
" 顯示行號 等於 set number
set shiftwidth=4
" tab 鍵縮排縮幾個空白長度
set selectmode=mouse
" 不知道這什麼 應該也是 GUI 底下吧…
set fileencoding=utf-8
" 檔案預設編碼
set fileencodings=ucs-bom,utf-8,gbk,big5,utf8
" 所有可使用的編碼
set ffs=unix,dos
" 可使用的檔案格式 fileformat
set ff=unix
" 預設的檔案格式 (r 與 n ^M)
set encoding=utf-8
" 設定 vim 內部如何表示字元
set termencoding=utf-8
" 終端機編碼
map <F3> :set cursorline!<CR><Bar>:echo "Highlight active cursor line: " . /
          strpart("Off    On", 3 * &cursorline, 3)<CR>
if &background== "light"
  highlight comment ctermfg=darkgreen guifg=darkgreen
else
  highlight comment ctermfg=green guifg=green
endif
nmap l <End>
highlight SpellErrors ctermfg=Red guifg=Red cterm=underline gui=underline  /
                      term=reverse
" 按了F3就會……… 巴拉巴拉巴拉


reference: http://wiki.gentoo.tw/mediawiki/index.php/Vim
 

發信人: mosquito.bbs@aeug.twbbs.org (風仔), 看板: P_TWMOS
標  題: [VIM] 目前設定
發信站: 反地球聯邦組織 (Fri Jul 28 23:09:48 2006)
轉信站: segaa!Group.NCTU!grouppost!Group.NCTU!AEUG
Origin: 211-74-119-20.adsl.static.seed.net.tw

 作者  chrisliu.bbs@bbs.ce.ncnu.edu.tw (ChrisLiu*), 看板  P_segaa
 標題  Re: [轉錄][VIM] 目前設定
 時間  土木小站 (Sat Jul 29 22:28:38 2006)
 

分類未分類

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料