[Fwd: Re: [wingide-users] Key mapping.]

Michael Hipp Michael at Hipp.com
Thu Aug 30 09:22:46 MDT 2007


This message was sent and answered back in January. But I'm trying to 
figure out if there is now a way to do the mapping of 'Esc' to 'ii' like 
Jim requested. I'd like to do that also.

Thanks,
Michael

-------- Original Message --------
Subject: Re: [wingide-users] Key mapping.
Date: Tue, 30 Jan 2007 11:04:00 -0500
From: Wingware Support <support at wingware.com>
To: SirJSR <sirjsr at gmail.com>
CC: wingide-users at wingware.com
References: <000301c74452$557d23a0$6501a8c0 at Lightning>

On Tue, 2007-01-30 at 02:38 -0700, SirJSR wrote:

> I have a hard time reaching up to the escape key to enter command
> mode, or should I say I don't want to reach that far.  This one thing
> kept me away from vi, vim, gvim for a long time.  And, I already have
> a little carpal tunnel syndrome going, and there's no way I am going
> to use Emacs---my hand wouldn't survive a weak. 
> 
> In my C:\Program Files\Vim directory, in my "_gvimrc" I put this
> command, below:
> 
> "map! ii <esc>" 
> 
> ... which allows me to exit insert mode by pressing the i key twice.
> If you press the i key once, wait a second, then press the i key
> again, it does not take you out of insert mode, but types out "ii".
> But how many time does one need "ii".  So, the net effect is that the
> "i" key becomes kind of a toggle key.  Never have to take your hand of
> the keyboard, and only one finger has to reach just above the home
> row. 
> 
> All kinds of way to do it:  http://www.vim.org/tips/tip.php?tip_id=285

You can't currently map ii in this way in Wing, but you can add other
key bindings.  Normally, this is done with the User Interface /
Keyboard / Custom Key Bindings preference.  However, that doesn't let
you enter the virtual mode indicators used in vi mode, so you'll have to
edit keymap.vi in your Wing installation.  You may want to keep your
additions in a separate file by using an import like this:

%include keymap.myvi

And then in the file keymap.myvi add something like:

'Insert-Kp_delete': 'enter-browse-mode'

You can easily find the key names using the Custom Key Bindings
preference.  Other alternatives that come to mind are:

'Insert-Kp_enter': 'enter-browse-mode'
'Insert-Kp_insert': 'enter-browse-mode'
'Insert-Ctrl-Space': 'enter-browse-mode'

Unlike the preference, this does require restarting Wing.

I saw someone recommended a keyboard as part of the solution on the page
you reference above.  I've got one of these:

http://www.comfortkeyboard.com/keyboards_comfort.html

While it doesn't address the problem you write about, it has made a huge
difference for me in general.

Hope that helps.

-- 
Stephan Deibel

Wingware
Wing IDE for Python
Advancing Software Development

www.wingware.com

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide


More information about the wingide-users mailing list