vim 超強發行版


推薦第一個:

https://github.com/spf13/spf13-vim

https://github.com/Spacevim/Spacevim

https://github.com/JBakamovic/yavide

 

linux 下閱讀代碼還有個收費軟件: scitools understand,不過要收費,聽說不便宜,但聽說很好用,推薦。

 

注意,安裝 spf13-vim 時 有一個 Bundle 叫 amirh/HTML-AutoCloseTag,github 上已經找不到這個庫了,用這個 vim-scripts/HTML-AutoCloseTag。

學習 vimrc script 的話推薦一本書:https://github.com/isayme/learnvimscriptthehardway-cn

 

我自己對 spf13-vim 有一點定制,如下:

(我的google服務器里有開箱即用的vim配置,不需要做任何改變,名叫:vim_all.tar。   另外,如果neocomplete自動彈出補全框無法自己彈出,可能是vim的編譯選項未支持lua等腳本,可以自己編譯也可以安裝 vim-nox,apt-get install vim-nox, 只針對ubuntu, vim-nox is for vim with no GUI

下面的操作都是在 spf13-vim 安裝完后。

1、安裝我自己修改過的 ShowMarks,在 ~/.vimrc.bundles.local 文件里加入:

Plugin 'vim-scripts/ShowMarks'

安裝完后用我自己的 ShowMarks.vim 文件替換該plugin原始的文件,該文件在我博客的另一篇文章里,直接在博客里搜索 vim。

然后在 ~/.vimrc.local 里加入 ShowMarks 的配置:

" ------------------------------------------------------------------
" Desc: ShowMarks configuration
" ------------------------------------------------------------------
let g:showmarks_enable = 1
let showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
" Ignore help, quickfix, non-modifiable buffers
let showmarks_ignore_type = "hqm"
" Hilight lower & upper marks
let showmarks_hlline_lower = 1
let showmarks_hlline_upper = 0

" update custom highlights
" ========================================================
" ShowMarks
" ========================================================
" For marks a-z
hi clear ShowMarksHLl
hi ShowMarksHLl term=bold cterm=none ctermbg=DarkBlue gui=none guibg=DarkBlue
" For marks A-Z
hi clear ShowMarksHLu
hi ShowMarksHLu term=bold cterm=bold ctermbg=LightRed ctermfg=DarkRed gui=bold guibg=LightRed guifg=DarkRed
" For all other marks
hi clear ShowMarksHLo
hi ShowMarksHLo term=bold cterm=bold ctermbg=LightYellow ctermfg=DarkYellow gui=bold guibg=LightYellow guifg=DarkYellow
" For multiple marks on the same line.
hi clear ShowMarksHLm
hi ShowMarksHLm term=bold cterm=none ctermbg=LightBlue gui=none guibg=SlateBlue

" colorscheme dracula
" set t_Co=8
" let g:solarized_termcolors=16
" color nature

" 下面這幾行不能啟用,啟用之后,tab無法自動變成4個space。如果未啟用,但仍然無法自動變成4個space,刪除~/.vimviews 清空緩存再試。
" show existing tab with 4 spaces width
" set tabstop=4
" when indenting with '>', use 4 spaces width
" set shiftwidth=4
" On pressing tab, insert 4 spaces
" set noexpandtab

" disable tab highlight
let g:indent_guides_enable_on_vim_startup = 0

set mouse=v

inoremap jk <esc>
inoremap kj <esc>
set timeoutlen=300
inoremap <esc> <nop>

 

 

如果你想改變spf13-vim 的color scheme, 則(我自己一般就使用 spf13 默認的):

set t_Co=8
let g:solarized_termcolors=16 color solarized

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM