Tom Xue
Tom Xue

Reputation: 3355

How to use command 'gd' in NetBeans+jVi?

As you may know, gd command is very useful and efficient in Vim. But after installing jVi to NetBeans, I found that gd is not available. Does anyone have a solution?

Upvotes: 0

Views: 445

Answers (4)

Ernie Rael
Ernie Rael

Reputation: 534

For gd you can use Ctrl-] .

map gd <C-]>

should do what you want. Though Ctrl-] might be easier

The Ctrl-] command is handled by NetBeans and not with a tags file. This will be exact.

Upvotes: 2

Rsh
Rsh

Reputation: 7752

It doesn't work For me either. You may want to check g#, it searches backward in your file. ( g* searches forward )
Also Netbeans itself can show you the declarations. you can use that.

Upvotes: 1

Tom Xue
Tom Xue

Reputation: 3355

I found the solution! NetBeans supports g# or g*, but doesn't support gd. However, to typing gd is more convenient. But as mentioned below, gd has different meaning from g*, so maybe I could use another self-defined name gs (goto same word)

So go to NetBeans -> Tools -> Options -> jVi Config -> Map Commands, and add below item:

map gs g*

That's it.

Upvotes: 0

romainl
romainl

Reputation: 196751

NetBeans is a powerful IDE, whatever variation on the "jump to declaration" theme it has will always be smarter and more accurate than Vim's.

<C-b> is NetBeans "equivalent" of Vim's gd.

Upvotes: 1

Related Questions