Thursday, September 9, 2010

ctags + Java

Hello,

I decided to conquer my fear/frustration of ctags, and found that Vim
doesn't like
the format that's generated by ctags for Java files (at least on Ubuntu 10.4.)

I find it odd, since the man page in ctags states that it supports Java files.

I used a simple Java class in Foo.java:

public class Foo {

public static void funct1 () {
System.out.println ("Inside funct1");
}

public static void main (String[] args) {
funct1();
}
}

Then, I went to the directory of Foo.java, and ran
>ctags --declarations --language=java *.java

I opened Foo.java in Vim, and tried Ctrl-] on the funct1(); line in
main(), but Vim stated that
"tag funct1 wasn't found".

I was able to solve the problem by using exuberant ctags, but I find it
odd that ctags man page states that it works for the Java language.

Does anyone use ctags on Java/other programming languages, or is it generally
understood to use exuberant-ctags when using other languages?

Thanks
--Nate

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment