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
Many `:[range]' commands accept an optional count as the first argument,
apparently this is true for :ilist also:
:il 3 20
finds `20' in the text. Not sure if the count has any purpose.
--
Andy
Thanks, I was going to propose :ilist to the OP but did not when
I could not get it to work.
A quick test shows you need a bang to get all numbers, including
those in comments as documented.
In a new buffer (':new') with these three lines:
123
> 123
let s = '123'
using ':ilist 1 123' shows only lines 1 and 3, while
':ilist! 1 123' shows all three lines.
John