1

Re: <C-]> doesn't work as expected in macro

Hello,

This is an incredible tool. I am having so much fun using it.

Right now I am working with macros. Here is one that I have recorded:

kkzoddjnkpkkkkbyeNjbbb<C-]>

Everything works as expected until Ctrl+]. It gives an error that says:

---------------------------
Microsoft Visual Studio
---------------------------
Cannot navigate to definition.  The cursor is not on a symbol.
---------------------------
OK   
---------------------------

The strange part is that if I split the <C-]> into a separate macro it works just fine. It seems like it need a pause in there to work correctly for some reason. This might be a more obscure scenario. I'm not exactly sure.

Is there a way to put a pause into a macro? Do you think that would help.

Thanks for all of your hard work.

2

Re: <C-]> doesn't work as expected in macro

This is most likely because the code that handles <c-]> doesn't update VS's idea of the cursor's position from ViEmu's internal variables before calling "Edit.GotoDefinition". I think this has already happened with some other command. I will look into this tomorrow and get back to you.

Thanks a lot for the very kind comments!

  -- Jon

3

Re: <C-]> doesn't work as expected in macro

Hi,

I just tested this manually, actually creating a macro that does "www<c-]>" to move three words to the right and go to the definition. It works fine for me in all of VS.NET 2003, VS2005 and VS2008 with C++ code. Since I guess the actual details of the movement in your macro above are not really important, can you please more details about the environment where you reproduced it (VS version, language you are using, etc...) so that I can try to reproduce this? Specific steps for me to reproduce it would be most helpful.

Best regards,

  -- Jon

4

Re: <C-]> doesn't work as expected in macro

Jon,

I will do some extra checking to make sure that I'm not doing anything wrong. Thanks for looking into this.

Here is my current configuration:
Windows Server 2003
Standard Edition
Service Pack 2

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Enterprise

Microsoft Visual Studio Team System 2008 Development Edition   91904-270-6850126-60278
Microsoft Visual Studio Team System 2008 Development Edition

AnkhSVN - Subversion Support for Visual Studio   2.0.4757.115
AnkhSVN - Subversion Support for Visual Studio 2.0.4757.115
* Built on Subversion 1.5.0 via SharpSvn 1.5000.614.32157

Microsoft Visual Studio Team System 2008 Development Edition - ENU Service Pack 1 (KB945140)   KB945140

Microsoft Visual Studio Team System 2008 Development Edition - ENU Service Pack 1 (KB947888)   KB947888

NGEDIT Software's ViEmu   v2.2.6
ViEmu 2.2 - vi/vim editor emulation for Microsoft(TM) Visual Studio(TM)
(c) 2005-2008 NGEDIT Software (www.ngedit.com)

SlickEdit Gadgets 2.0   SlickEdit Gadgets
Installed Packages: CommandSpy , Editor Gadgets , SLOC Graph , IDataObject Analyzer , File Explorer
Version: 2.0.0.1

Windows Installer Editor   
Windows Installer Editor for Wise Installation Studio 7.3
Copyright (c) 2006 Altiris, Inc.

5

Re: <C-]> doesn't work as expected in macro

And, what language are you developing in? It may make a difference in how Edit.GotoDefinition works.

On the other hand, the SlickEdit Gadgets plug-in is the most likely to cause some trouble, out of the ones you have listed (it may not be the cause, though!)

Any simplified description of how to reproduce the problem will be useful.

Regards,

  -- Jon

6

Re: <C-]> doesn't work as expected in macro

I am using C#.

I did get rid of SlickEdit and the problem persisted.

I have tried to come up with a simplified reproduction and I can't. I can't seem to isolate what is making this particular case cause the error.

My workaround for right now is using *. It wouldn't work in all situation, but for what I am doing it accomplishes the same results.

Thanks for the help. I will update if I am able to come up with a simplified reproduction.

7

Re: <C-]> doesn't work as expected in macro

This is really weird. Indeed, * can help for local stuff, but it won't allow fast navigation.

Does right-clicking on the id and selecting "Go to Definition" work?

Let me know if you find some way I can reproduce it.