On Mon, July 16, 2012 15:53, Andre Majorel wrote:
> Doing a backward search with "exe '?myregexp'" ignores a match
> on the current line. Doing just "?myregexp" would find it, as
> long as it's before the cursor.
The first command specifies an address range (exe executes the result
of the expression as an Ex command and not a normal command), while
the second command actually performs a search in normal mode and by
definition, the :? range looks on the previous line where pattern
matches and does not consider the current line at all.
> Where is this quirk documented and can it be disabled ?
:h :range
You can however either use the exe "norm! ?pat\<CR>" or use the
search() function.
regards,
Christian
--
You received this message from the "vim_use" 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
No comments:
Post a Comment