I often make the mistake of typing w1 instead of w!.
Can you please suggest how to map w1 to w!?

TIA

On Wed, Nov 5, 2008 at 7:19 PM, Tony Mechelynck
<[EMAIL PROTECTED]> wrote:
>
> On 05/11/08 17:32, Christian Brabandt wrote:
>> Hi Robert!
>>
>> On Wed, 05 Nov 2008, Robert wrote:
>>
>>> Frequently when I go to save with :w I am flying to fast and I type
>>> :W which gives me an obvious error.
>>>
>>> How can I map :W to :w ???
>>>
>>> I know there is :ZZ but I like the :w more.
>>>
>> :command! -bang W w<bang>
>>
>> regards,
>> Christian
>
> Well, I'd rather say
>
>        command! -bang -bar -nargs=? -complete=file -range=% W
>                \ <line1>,<line2>w<bang> <args>
>
> or
>
>        if version < 700
>                cnoreabbrev W w
>        else
>                cnoreabbrev <expr> W
>                \ ((getcmdtype() == ':' && getcmdpos() <= 2)?
>                \ 'w' : 'W')
>        endif
>
>
> Best regards,
> Tony.
> --
> A baby is God's opinion that the world should go on.
>                -- Carl Sandburg
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to