1

Re: Possible parsing error when matching braces in strings

Hi,

I noticed a curious issue with brace matching (% command)

Note the following C# function:

public static bool IsRTF(string rtf)
{
        return rtf.StartsWith(@"{\rtf");
}

Go to the bottom brace and press %, it will jump to the { within the string instead of the correct match.

Cheers,

Darren

2

Re: Possible parsing error when matching braces in strings

I found a workaround:

public static bool IsRTF(string rtf)
{
        return rtf.StartsWith(@"{\rtf"); // }
}

Cheers,

Darrren

3

Re: Possible parsing error when matching braces in strings

Darren,

Indeed, ViEmu's brace matcher is a very simplistic text-scanning matcher. Since Codekana has a full-blown parser which is quite smart about these things, it remains on my future plans to add a ViEmu <-> Codekana bridge that will allow ViEmu to use the smarts in CK to make it better understand the code (for this and other cases).

Thanks for posting the work-around too!

  -- Jon

4

Re: Possible parsing error when matching braces in strings

This is still an issue, glad to see a workaround posted here, but as I work in a team and sadly am the only VI user, I can't use this workaround. Are there still plans to fix this (with the Codekana bridge)? As a side note, VIM has the correct behavior.

5

Re: Possible parsing error when matching braces in strings

Hi Darren,

In the latest ViEmu releases we fixed another issues we thought were more relevant.

We still plans to fix this, but the bridge ViEmu/Codekana is a complicated task that requires an additional development effort and we still working on it.

Thanks.