vim外掛的安裝

lfreeali發表於2010-10-12

最近安裝vim 7.3,重新整理一下自己喜歡的外掛

1.ALign 外掛:
http://www.vim.org/scripts/script.php?script_id=294
http://www.vim.org/scripts/download_script.php?src_id=10110

安裝很簡單:
vim Align.vba.gz
:so %
:q

注意要刪除舊的AlignMaps.vim檔案,不要map會衝突!
新的改名為AlignMapsPlugin.vim。

2.SQLUtilities 外掛
SQL utilities – Formatting, generate – columns lists, procedures for databases
http://vim.sourceforge.net/scripts/script.php?script_id=492
http://vim.sourceforge.net/scripts/download_script.php?src_id=13576

install details
Put into your .vim/plugin or vimfiles/plugin directory.
Put into your .vim/autoload or vimfiles/autoload directory.
Put into your .vim/doc or vimfiles/doc directory, run :helptags $VIM/vimfiles/doc.

3.ClosePairs 外掛
Auto closes pairs of characters

安裝很簡單,拷貝到plugin目錄。

4.surround 外掛
Delete/change/add parentheses/quotes/XML-tags/much more with ease

install details
Extract to ~/.vim, or ~vimfiles (Windows).  You`ll need to regenerate helptags (fill in the install path below)
:helptags ~/.vim/doc
 
具體要看它的使用文件surround.txt。
ds  = Delete surroundings is *ds* .
cs  = Change surroundings is *cs* .  It takes two arguments, a target like with
       |ds|, and a replacement.  Details about the second argument can be found
       below in |surround-replacements|.  Once again, examples are in order.
ys  =  *ys* takes a valid Vim motion or text object as the first object, and wraps
       it using the second argument as with |cs|.  (Unfortunately there`s no good
       mnemonic for “ys”.)      
       As a special case, *yss* operates on the current line, ignoring leading
       whitespace.
特點比較複雜,而ClosePairs插入很簡單。

5.calendar.vim
       顯示日曆

6.bccalc.vim : evaluate equations within vim

修改; =>
加入:
noremap  bx A=”eyy:call CalcLines(0)
noremap  bs A = “eyy:call CalcLines(0)

這樣可以直接獲得結果。

windows要修改,不然不能做乘法:
let str = escape (str, `*();&>修改為:
let str = escape (str, `();&>
7.increment.vim:
http://www.vim.org/scripts/script.php?script_id=842
http://www.vim.org/scripts/download_script.php?src_id=7541

操作比原來複雜了,自己要再看看!

:helptags d: oolsvimvim73doc

:help Inc

8.word_complete.vim
http://www.vim.org/scripts/script.php?script_id=73
http://www.vim.org/scripts/download_script.php?src_id=6504

To activate, choose “Word Completion” from the Tools menu, or type
  :call DoWordComplete()
To make it stop, choose “Tools/Stop Completion,” or type
  :call EndWordComplete()
If you want to activate word completion for every buffer, add the line
  :autocmd BufEnter * call DoWordComplete()

我修改了:
let g:WC_min_len = 3

9.cream-capitalization.vim
As long as you don`t already have keyboard mappings to the F5 key,
these keyboard shortcuts will now be available:
    F5        Capitalize selection, title case
    Shift+F5  Uppercase selection
    Alt+F5    Lowercase selection
    Ctrl+F5   Reverse case of selection

很老的外掛,現在很少使用了。

 


相關文章