Re: Unintentional behavior of i< and a< text objects?
- On Fri, Feb 5, 2010 at 10:12 AM, Ben Fritz <fritzophrenic@...> wrote:
> I was editing a mapping I have that starts with <C-\><C-O>, and wantedThis is based on the M flag of 'cpoptions'. The vi-compatible behavior
> to change it to just <C-O>. So, I put my cursor on the first '-' and
> typed, da< hoping to delete just <C-\>. I discovered that the
> backslash acts as an escape character for the text object, and I ended
> up deleting most of my buffer (until it found an unmatched >). No
> harm, just had to press 'u', but the behavior surprised me.
(M included in 'cpo'), is ignorant of backslash escapes and would do
what you had expected. It might be useful to add a hint to this effect
for the brace-like text-objects.
> I understand the usefulness of escaping things like double quotes, butYes, it is. It's the findmatchlimit function in search.c and it honors
> I don't believe I've ever seen a syntax where '\' escapes a '>'. I
> believe there are few where it also escapes a single quote. Perhaps
> this is common code, though?
the % and M flags for 'cpoptions'.
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php