A vi question
Brian McKee
brian.mckee at gmail.com
Tue Sep 8 23:19:14 UTC 2009
On Tue, Sep 8, 2009 at 3:59 PM, stan<stanb at panix.com> wrote:
> On Tue, Sep 08, 2009 at 03:20:06PM -0400, Brian McKee wrote:
>> On Tue, Sep 8, 2009 at 2:35 PM, stan<stanb at panix.com> wrote:
>> > vi is a continuing learning experinece :-)
>> Until the day I die I expect :-)
>>
>> > :.,$s/^*OTE/OTE/
>> > But * is not the appropriate wildcard here in vi.
>> As Rashkae pointed out - .* not just *
>>
>> But your data had TWO 'OTE' strings in it.
>> Do you need the first one or the last one? As shown it's the last one
>> you'll get.
>> If you want only up to the first one (non-greedy) try
>> :.,$s/^.\{-}OTE/OTE/
>>
> OH cool tht helps, thanks.
>
> What does the \{-} syntax mean?
Do :help greedy
Better than I'd mangle an explanation.
Brian
--
All you need to know about Ubuntu 9.04 Jaunty -> gconftool -s --type
bool /apps/update-notifier/auto_launch false
More information about the ubuntu-users
mailing list