开发者

Use VIM omnicomplete for javascript with ctags

I am using vim/gvim for 4 months already and now I found a way to use it's strengths. My tags file is generated very well and here is a simple row in it.

my.namespace.classname /path/to/file.js /^my.namespace.classname = function(first_arg,$/;" f

Here is an example what i need to omnicomplete:

my.namespace.cla <- omnicomplete list with all classnames in the my.namespace

The above is the key to my problem, because it looks like omnicomplete searches only namespace without including "my." in front of it. So i see other element in the omnicomplete list and not my classname at all.

However, if i type :tag my.namespace.classname for 开发者_运维知识库example gvim opens the correct file at the correct position.

What is wrong and how can I make it work?


I've noticed that a lot of omnicomplete is not well developed. I've used the php omnicomplete and have had to go in and tweak a lot of it to get it working correctly. I recommend you download omnicomplete for javascript. Then add it to your plugins directory. Then make edits to it until it does what you want it to do.

Sorry I couldn't be of more help - but at least you won't go answerless any longer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜