1

Re: :cn and :cp

When I do either of the above ex command line commands, nothing happens.  This is, of course, after compiling and having errors in the error list.  Both just silently fail.

Has anyone else experienced this?

If I do the following:
:vsc View.NextError
it works great.

I do not have any keyboard shortcuts bound to View.NextError or View.PrevError

Thanks!

2

Re: :cn and :cp

dreyln,

ViEmu is calling "Edit.GotoOutputWindow[Next|Previous]Location" for :cn and :cp.

"View.[Next|Previous]Error" are only available in VS2005+, but also, they don't seem to work in C++ projects. Going to the QuickFind window and typing ">View.NextError" says "command not available".

I guess View.NextError works in other types of projects, I suppose C#. Can you let me know what language you are working in, so that I can check it?

The fix will be a bit more complex than just substituting what VS command is called, it must probably be context-dependent. Let's try to work out what context parameters it would have to check, in order to implement it properly.

Regards

  - Jon

3

Re: :cn and :cp

OK, I think I know what is going on now.

I have the "MSBuild project build output verbosity" set to "Detailed", so invoking :cn/:cp would appear to do nothing because it was just going to a non-error line in the Output Window.  If I set that option to "Minimal" it works as expected.

The VS command View.NextError works for me in C# and c++/cli (I'm using VS 2008).  My guess is that it is at least valid for VB as well.

4

Re: :cn and :cp

Ah ok. I don't really know what the best course of action would be... what the implementation of :cn/:cp should check for in the environment before issuing one or the other command... or whether having different commands would be best!

Let me know what you think.

  -- Jon

5

Re: :cn and :cp

My vote would be for separate commands.  Seems like that would be the easiest to implement and get the best of both worlds.

6

Re: :cn and :cp

That's an easy one to implement. Suggestions for the new commands' names?

:en[ext] and :ep[rev]?

:ep doesn't clash with anything, :en clashes with vim's :ene[w], which I'd never heard of before, does anyone use that?

7

Re: :cn and :cp

:en and :ep are fine by me.  I think :ene just opens a new blank buffer in vim.

8

Re: :cn and :cp

I've finally added them as ":ern[ext]" and ":erp[revious]". They will be available when I do another release. I haven't actually been able to use them, because the underlying VS commands don't work in VS2005 and VS2008 with C# projects, but they will work when "View.NextError" and "View.PreviousError", whenever that is. This doesn't seem like a very clean area in Microsoft's VS design, either.

-- Jon