1

Re: 'find previous' fails when using '\zs' and/or '\ze' -- VS2008

Given this C# code:

public interface IThing
{
    IObject { get; set; }
    IDooDad { get; set; }
}

public class AClass : IThing
{
    IObject { get; set; }
    IDooDad { get; set; }
}

public interface IObject
{
    IWidget { get; set; }
    // blah blah blah
}

public interface IDooDad {}

public interface IWidget
{
    string get_description();
    IOther { get; set; }
}

------------

Let's say I want to navigate from interface description to interface description, bypassing other type declarations and member variables, and with the caret at the leading I in the interface name.

/interface \zsI\ze[A-Z]

This works fine for navigating forward, and if I :set hls, all the correct Is are highlighted, but when I attempt to move to the previous match I get no movement.  This approach works as expected in Vim.

2

Re: 'find previous' fails when using '\zs' and/or '\ze' -- VS2008

Hmmm... this is a tricky one. The reason it doesn't work is that ViEmu starts scanning backwards from the current cursor position, and thus, given you are using \zs, the same match is found again.

I wonder how vim works around this? A special case of "just moved here from a find"? Or maybe find backwards again if the found position is the same as the starting one? Each one will show different weird side-effects. If anyone knows the details, I'll be happy to hear about them! If not, I'll check it myself when I can attempt to fix this issue (the new customer portal and the new Codekana web site are consuming almost all of my time!).

  -- Jon

3

Re: 'find previous' fails when using '\zs' and/or '\ze' -- VS2008

Thanks, Jon -- I like the second approach, but don't really know how Vim does it, nor what else that might screw up.

These are always little things that can be worked around as a user -- I'm just reporting the idiosyncrasies as I see them.

Jay (@jittery)

4

Re: 'find previous' fails when using '\zs' and/or '\ze' -- VS2008

Thanks Jay, indeed, even if not critical, I'm grateful for the report, as I can fix it to make the product better (even if it's not immediately). I'm just hoping I can finish the new Codekana web site and the new Symnum/NGEDIT customer area shortly so that I can get back to really improving the products! Hopefully by the end of the month.

  -- Jon