Re: dab on escaped backslashes
- Christian Brabandt wrote:
> On Mo, 22 Okt 2012, Andy Wokula wrote:The M flag in cpo is really only for commands that need to be Vi
> > Am 22.10.2012 09:55 und 09:59, schrieb Axel Bender:
> > >Is there any possibility to make dib (or dab for that matter) ignore
> > >escaped backslashes, e.g.
> > >
> > >Current behavior:
> > >"( \(a[cursor_here]bc) )" -> dib -> "() )"
> > >
> > >Desired behavior:
> > >"( \(a[cursor_here]bc) )" -> dib -> "( () )"
> > >Addendum: I'm not looking for a macro/function but for a setting.
> > :h cpo-M
> > ,----
> > | M When excluded, "%" matching will take backslashes into
> > | account. Thus in "( \( )" and "\( ( \)" the outer
> > | parenthesis match. When included "%" ignores
> > | backslashes, which is Vi compatible.
> > `----
> > (excluded per default)
> > :set cpo+=M
> > What happens:
> > '( \(a[cursor_here]bc) )' -> dib -> '()'
> > So the `M'-flag also influences `ib' ... in some way.
> > Looks buggy, because backslashes are still not ignored.
> Andy, Axel, Is this what you expect?
> :set cpo+=M
> '( \(a[cursor_here]bc) )' -> dib -> '( \() )'
> Here is a simple but ugly fix:
compatible. It's supposed to work better without that flag.
What language has a backslash for ( but not for )? We should handle
that in a more generic way then, not just for "dib".
Every engineer dreams about saving the universe and having sex with aliens.
This is much more glamorous than the real life of an engineer, which consists
of hiding from the universe and having sex without the participation of other
life forms. (Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php