Re: [patch] fix for the Find/Replace dialog
- Thomas de Grenier de Latour wrote:
> > The difficulty is that s/foo/bar/ would replace the first matchNote that in the current Vim 7 version (alpha version) a proper solution
> > on current line instead of the match under cursor. So what is
> > done if, for instance, the cursor is on the 4th column, is to
> > execute s/\(....\)foo/\1bar/ instead.
> Sure, if i had read the doc more in depth sooner, i would have
> known that there is this nice \%# sequence to match the cursor
> position, which is exactly what was needed... Shame on me :/
> So here is a much simpler patch that uses \%# instead of the ugly
> hack above.
is used to check the length of the matched text. Your patch could be
used as a temporary solution for Vim 6.
ARTHUR: Old woman!
ARTHUR: Man, sorry. What knight lives in that castle over there?
DENNIS: I'm thirty seven.
DENNIS: I'm thirty seven -- I'm not old!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///