Ben Kim wrote:
> I wanted to know how I can open a class file in hierarchy.
>
> For example, my source would have this line:
>
>        org.postgresql.someclass;
>
> I want to open it using something like this (type cf on the
> file name).

If you like just to navigate to this class, easiest way which I
know is jumping with CTRL-] - this assumes you have "tags" file
(generated with exuberant ctags). Works very well, excepting the
cases, if you have many classes with the same names in different
packages.

:help CTRL-]

It is also very convenient to use wildcard match and
tab-completion features with :tag command - for instance type
:tag my*her<TAB>, and VIM will expand it to the full name of
class (like MyRedHerring).

Another more powerful but more complicated possibility - if you
agree with running eclipse in the background while you do your
java editing in VIM, you can use eclim [1] plugin to speak with
eclipse and do a wide range of interesting things with java -
code completion, jumping to the exact definitions of the
overloaded methods, generation of java doc, auto correction,
formatting the sources, validation on save, auto insert of the
imports, imports clean-up, checkstyle, navigating classes
hierarchy, accessing eclipse local history of the file changes,
...

-- 
Anton

[1] eclim project
http://eclim.sourceforge.net/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to