Vim7 的新功能
时间:2006-10-31 来源:merino
getscript plugin
:GetLatestVimScripts |
vimball plugin
這是 Vim 檔案打包的新方式。例如我事先編輯好(或直接寫在目前 vim 正在編輯的檔案內容上亦可)欲打包的檔案(使用相對路徑)。例如在我的 ~/.vim 目錄中有:
~/.vim/doc/vifm.txt |
doc/vifm.txt |
:1,2MkVimball vifm |
vim vifm.vba |
:so % |
spell 拼字檢查,已整合進 Vim7,變成是內建的功能了
:set spell |
]s 移至下一個拼錯或罕用的字。 |
http://lingucomponent.openoffice.org/spell_dic.html
http://lingucomponent.openoffice.org/affix.readme
Vim 可以經由 :mkspell 指令可以將 Myspell 的 *.aff/*.dic 轉換成 Vim 使用的 *.spl/*.sug。當然要從純文字檔來轉換也是可以的。另外,Vim 有延伸他的功能,亦即也支援 Hunspell。詳細請 :help spell。
Omni 智慧型單字補全(completion)
這是在 insert mode 就可以把一些單字補全的功能,相當實用。
以 Ruby 為例:
:setlocal omnifunc=syntaxcomplete#Complete |
內建 grep 功能
:vim[grep] |
:vim /require/ *.rb |
CJK 列印
:hardcopy ==> 直接送印表機 |
set printmbcharset=ETEN |
cd /usr/share/ghostscript/8.15/Resource |
這裡只是簡單的介紹,其他還增加許多功能,包括新的選項、新的 Vim script 函式及指令,詳細請:
:help version7.txt |