神器VIM 常用技巧
--welleelin
参考资料
国内
http://lilydjwg.is-programmer.com/
http://edyfox.codecarver.org/html/vim.html
http://www.ibm.com/developerworks/cn/linux/l-tip-prompt/tip15/
国外
Using Vim as a Complete Ruby on Rail s IDE
Ubuntu 10.4 编译 VIM7.3
http://easwy.com/blog/archives/compile-vim73-on-ubuntu/
How to solve compile vim with ruby enabled
http://stackoverflow.com/questions/3794895/installing-vim-with-ruby-support-ruby
This should help (I got Ubuntu):
- sudo apt-get install mercurial
- hg clone https://vim.googlecode.com/hg/ vim
- cd vim
- ./configure --enable-rubyinterp
- make
- sudo make install
To test if things look fancy:
- vim --version | grep ruby
Should return something like:
-python3 +quickfix +reltime -rightleft +ruby +scrollbind +signs +smartindent
Ruby should have plus now. Another trick to test it - enter vim and hit :ruby 1
. Should not fail.
configure
./configure --enable-gui=gnome2 --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --disable-netbeans --prefix=/usr --enable-python3interp
Linux 卸载vim
用make install安装,对吧
那就用make uninstall提换掉make install。
cd 源代码目录
make clean
./configure
make uninstall
vimrc参考
https://github.com/akitaonrails/vimfiles/ <-- 俺正在用基于介个银滴vim配置的vim
pathogen.vim 要生成帮助文档的话,就在vim下输入:call pathogen#helptags()
https://github.com/tpope/vim-pathogen
http://blog.csdn.net/redguardtoo/archive/2006/09/03/1172136.aspx
http://www.2maomao.com/blog/wp-content/uploads/vim_tips.txt
windows 编译 vim
windows 安装 Command-T
http://chrislaco.com/blog/gettimg-command-t-working-on-windows/
http://rfbrazier.posterous.com/installing-the-command-t-vim-plugin-on-window
更新帮助文档命令
更新帮助文件的tags,如:
:helptags d:\soft\Vim\vimfiles\doc\
Vim chinese version help
http://sourceforge.net/projects/vimcdoc/
ci[ 删除一对 [] 中的所有字符并进入插入模式 ci( 删除一对 () 中的所有字符并进入插入模式 ci< 删除一对 <> 中的所有字符并进入插入模式 ci{ 删除一对 {} 中的所有字符并进入插入模式 cit 删除一对 HTML/XML 的标签内部的所有字符并进入插入模式 ci” ci’ ci` 删除一对引号字符 (” 或 ‘ 或 `) 中所有字符并进入插入模式
Here are some basic formatting commands:
You can format the entire buffer with gg=G .
内置快捷键参考
http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html