Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. " 檔案編碼
  2. set encoding=utf-8
  3. set fileencodings=utf-8
  4.  
  5. " 編輯喜好設定
  6. syntax on " 語法上色顯示
  7. colorscheme iceberg " 佈景主題
  8. set t_Co=256 " 啟用256色顯示
  9. set tabstop=4 " tab 占幾個字元數
  10. set softtabstop=4 " 實際tab 的長度(tabstop + space)
  11. set expandtab " 用 space 展開 tab
  12. set ai " 自動縮排 autoindent
  13. set shiftwidth=4 " 設定自動縮排寬度 = 4
  14. set nu " 顯示行號 number
  15. set ru " 顯示右下角的狀態列 ruler
  16. set backspace=2 " 在 insert mode 也可用 backspace 刪除任意值
  17. set ic " 設定搜尋忽略大小寫
  18. set hlsearch " 設定高亮度顯示搜尋結果
  19. set incsearch " 在關鍵字還沒完全輸入完畢前就顯示結果
  20. set confirm " 操作過程有衝突時,以明確的文字來詢問
  21. set history=100 " 保留 100 個使用過的指令
  22. set cursorline " 顯示目前的游標位置
  23. " set spell " 拼字檢查
  24. " set smartindent " automatically inserts one extra level of indentation
  25. " in some cases
  26.  
  27. " 狀態列設定
  28. set laststatus=2 " 在底部倒數第二行顯示狀態列(statusline)
  29. set statusline=%1*%<\ %2*[%F]
  30. set statusline+=%1*\ %3*[%{&encoding},%{&fileformat}
  31. set statusline+=%{\"\".((exists(\"+bomb\")\ &&\ &bomb)?\",BOM\":\"\").\"\"}]
  32. set statusline+=%m%1*%=\ %4*%y%1*\ %5*%l/%L%1*,%5*%c%1*\ %6*\<%P\>%4*
  33. highlight User1 term=underline cterm=underline ctermfg=white
  34. highlight User2 ctermfg=red
  35. highlight User3 ctermfg=cyan
  36. highlight User4 ctermfg=white
  37. highlight User5 term=underline cterm=underline ctermfg=yellow
  38. highlight User6 term=underline cterm=underline ctermfg=green
  39.  
  40. " Vim 自動回到檔案上次開啟時讀到位置
  41. if has("autocmd")
  42. autocmd BufRead *.txt set tw=78
  43. autocmd BufReadPost *
  44. \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  45. \ exe "normal g'\"" |
  46. \ endif
  47. endif
  48.  
  49. " Auto-complete HTML code
  50. autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement