Anyway to bind...

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyway to bind...

Matt Rechkemmer
Is there anyway to bind :Wq and :Q, to their respective :wq and :q? I always
seem to fat finger the shift key, and would prefer for that part of the
function to be case insensitive.

Thanks,

--
Matt Rechkemmer
[hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Anyway to bind...

Halim, Salman
:com! Wq wq
:com! Q q

:help command

Salman.

> -----Original Message-----
> From: Matt Rechkemmer [mailto:[hidden email]]
> Sent: Friday, October 07, 2005 12:36 PM
> To: [hidden email]
> Subject: Anyway to bind...
>
> Is there anyway to bind :Wq and :Q, to their respective :wq
> and :q? I always seem to fat finger the shift key, and would
> prefer for that part of the function to be case insensitive.
>
> Thanks,
>
> --
> Matt Rechkemmer
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

RE: Anyway to bind...

Keith W. Roberts
In reply to this post by Matt Rechkemmer
----Original Message----
From: Matt Rechkemmer [mailto:[hidden email]]
Sent: Friday, October 07, 2005 9:36 AM
To: [hidden email]
Subject: Anyway to bind...

> Is there anyway to bind :Wq and :Q, to their respective :wq and :q? I
> always seem to fat finger the shift key, and would prefer for that
> part of the function to be case insensitive.
>
> Thanks,

I believe this should work:

        cnoreab Wq wq
        cnoreab Q  q

-Keith
Reply | Threaded
Open this post in threaded view
|

Re: Anyway to bind...

A.J.Mechelynck
In reply to this post by Matt Rechkemmer
Matt Rechkemmer wrote:

> Is there anyway to bind :Wq and :Q, to their respective :wq and :q? I always
> seem to fat finger the shift key, and would prefer for that part of the
> function to be case insensitive.
>
> Thanks,
>
> --
> Matt Rechkemmer
> [hidden email]
>
>
>

        :cabbrev Wq wq
        :cabbrev Q q

see "help abbreviations"

HTH,
Tony

Reply | Threaded
Open this post in threaded view
|

Re: Anyway to bind...

Tim Chase-2
In reply to this post by Matt Rechkemmer
> Is there anyway to bind :Wq and :Q, to their respective :wq
> and :q? I always seem to fat finger the shift key, and would
> prefer for that part of the function to be case insensitive.

Seems like the command you want is "command" :)

Something like

        :command! -bang Wq wq<bang>
        :command! -bang Q q<bang>

see ":help command" for more info.

-tim




Reply | Threaded
Open this post in threaded view
|

Re: Anyway to bind...

Gary Johnson
In reply to this post by Matt Rechkemmer
On 2005-10-07, Matt Rechkemmer <[hidden email]> wrote:
> Is there anyway to bind :Wq and :Q, to their respective :wq and :q? I always
> seem to fat finger the shift key, and would prefer for that part of the
> function to be case insensitive.

You could use a cmap, but I think a command would be safer since it
would only work immediately after the ":".

    command Wq wq
    command Q q

HTH,
Gary

--
Gary Johnson                 | Agilent Technologies
[hidden email]     | Wireless Division
                             | Spokane, Washington, USA