VIM ctags setup ack

[url=http://hlee.iteye.com/blog/1780090]reference[/url]

ctags --extra=+f --exclude=.git --exclude=log --exclude=coverage --exclude=public/assets -R *  /home/ken/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/*


ctags --extra=+f --exclude=.git --exclude=log --exclude=coverage --exclude=public/assets -R * `rvm gemdir`/gems/*

[color=red]再再更新:2012/10/8[/color]
ubuntu下Ack 被覆盖问题
sudo ln -s /usr/bin/ack-grep /usr/local/bin/ack

[color=red]再更新:2012/07/28[/color]
1. mac下ctags错误提示
2. 手册地质
[url]http://vim-taglist.sourceforge.net/manual.html[/url]
[color=red]严重更新[/color]
MAC的用户,FuzzyFinder,推荐用peepopen去peepcode看或者github和textmate的command t很像
而且,brew install macvim很有必要,因为直接支持ruby运行
3.
[quote]highlight group not found: Normal[/quote]
#.vimrc
colorscheme default



sudo aptitude remove vim
sudo aptitude install vim-rails
#in order to get vim-rails support


git clone git://github.com/astrails/dotvim.git
ln -sfn dotvim .vim
ln -sfn dotvim/vimrc .vimrc
cd .vim; make install


If you got error like below:
[quote]'Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.'[/quote]


sudo aptitude install exuberant-ctags



sharpair:~$ /usr/bin/ctags
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
sharpair:~$ /usr/local/bin/ctags
ctags: No files specified. Try "ctags --help".
sharpair:~$ which ctags
/usr/local/bin/ctags
sharpair:~$ ctags
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
sharpair:~$


[img]http://dl.iteye.com/upload/attachment/0071/4867/9497b8f1-1ea3-305d-b3c3-b51c4f201ff1.png[/img]
When I try to open the taglist window, I am seeing the following error message. How do I fix this problem?

[quote] Taglist: Failed to generate tags for /my/path/to/file
ctags: illegal option -- -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file ...[/quote]

The taglist plugin will work only with the exuberant ctags tool. You cannot use the GNU ctags or the Unix ctags program with the taglist plugin. You will see an error message similar to the one shown above, if you try use a non-exuberant ctags program with Vim. To fix this problem, either add the exuberant ctags tool location to the PATH environment variable or set the Tlist_Ctags_Cmd variable.

#mac下面要brew一个新的ctags,如果提示旧的ctags有问题的话
hash -d ctags



#如果要用ctrl ]来查gem里的方法,还需要ctags准备taglist
map <Leader>rt :!ctags --extra=+f --exclude=.git --exclude=log -R * `rvm gemdir`/gems/*<CR><CR>

map <silent><Leader>rt :!ctags --extra=+f --exclude=.git --exclude=log -R * `gem environment gemdir`/gems/*<CR><CR>
#只是查bundle的gem
map <silent> <Leader>rt :!bundle list --paths=true \| xargs ctags --extra=+f --exclude=.git --exclude=log -R *<CR><CR>





#.vimrc
set fileformat=unix
let Tlist_Ctags_Cmd='/usr/local/bin/ctags'


if you need make sure

rvm use system


modify your ~/.vim/Makefile



PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值