1

Re: Go to Definition

Hi guys,

I'm having a small issue with go to definition. In the VIM manual it says that 'gd' takes you to the definition of a symbol, and I'd expect that to work in the same way that F12 does in the Vis Studio bindings.

With ViEmu enabled, F12 takes me to the definition of the symbol, but seems to put me in visual mode immediately, which is a bit annoying as that extra 'esc' keypress is taking up valuable time! smile

When I use 'gd', it seems to operate the same as '*' but without taking me to the next instance of the symbol under the cursor, it'd be nice if this behaved the same as F12, but without the visual mode being turned on.

Am I doing something wrong? Is this intended behaviour?

Cheers
OJ

2

Re: Go to Definition

Hi OJ,

In vim 'gd' means 'go to local declaration'. What it does is (1st) take note of the word under the cursor, (2nd) scan upwards until the first line it finds starting with '{', and (3rd) search for the word saved in step 1 downwards. This usually goes to the current local variable in C-like languages, if you stick to a certain one-true-brace-style.

The vim command to go to a symbol's definition is Ctrl-], and ViEmu emulates it by calling VS's Edit.GotoDefinition which should do what you want. Currently, it enters insert mode, but I'll try to fix that by the next build.

Regards,

  Jon

3

Re: Go to Definition

Jon,

Thanks for the prompt and excellent feedback, your help is greatly appreciated.

Cheers!
OJ

4

Re: Go to Definition

You're welcome!