Tuesday, April 24, 2012

:il[ist] with numeric patterns

According to the help (:he :ilist)
:il /foo/
would find all occurrences of the string 'foo' while
:il foo
would find all occurrences of the pattern \<foo\>, that is, 'foo' as a
whole word.

I've found that when the pattern is a number this is no longer the case:
:il /20/
finds all occurrences of the string '20' as expected, but
:il 20
gives an "E389 Couldn't find the pattern" even if '20' does occur as a
whole word. In fact,
:il /\<20\>/
effectively finds all occurrences of '20' as a whole word.

Is this a bug or am I missing something?

gVim on Windows 7
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 18 2011 14:48:22)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-284

--
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