Sunday, April 4, 2010

Re: CTRL+W under MS Windows

On 05/04/10 07:14, Aarto Matti wrote:
> Hello guys.
>
> I'm very used to the fact that I don't have to press capital 'w' when
> splitting or closing windows. That trick doesn't work in MS Windows
> version of Vim, there I actually have to use capital 'W' (Shift + w).
> Mapping<C-w> to<C-W> doesn't work either. Any help is appreciated!
>
> --
> Aarto
>

- According to ASCII (which Vim follows for its Ctrl + printable key
combinations, except maybe on EBCDIC machines), Ctrl + uppercase and
Ctrl + lowercase are synonymous. In particular, Ctrl-W and Ctrl-w both
correspond to 0x17.

- When I was on Windows (98, then XP), I never needed to hold the Shift
key to generate a Ctrl+letter combo. If your keyboard doesn't produce
anything for Ctrl+W unless you also hold Shift, then maybe there is
something wrong with your keyboard.

- You didn't say whether you're using gvim or Console Vim; gvim has more
direct access to the keyboard. If Console Vim doesn't work for you, try
gvim.

- The Ctrl-W prefix and the :winc[md] ex-command are equivalent. Mapping
one to the other wouldn't be easy however, because the ex-command (but
not the Normal-mode command) needs a carriage-return (an <Enter>
keypress) after its operand.

- You can also map something else (not Ctrl-w because Vim cannot tell it
apart from Ctrl-Shift-w) to Ctrl-W. Don't use an {lhs} that already does
something. In Normal mode, your best bets are F2 to F12 (maybe not F10
if it triggers the System menu), Shift-F1 to Shift-F12, or any accented
letter or other non-ASCII character that may be present on your
keyboard. (Mine has ² é § è ç à µ ù that need neither AltGr nor Shift
nor Alt nor a dead-key prefix, plus a host of others if I remove that
restriction; but with a name like yours, I'd bet your keyboard is more
likely Finnish than Belgian.) In Normal mode you can also use Alt-key
combinations (to Vim, Alt-w is equivalent to the ÷ division sign 0xF7).


Best regards,
Tony.
--
Surprise your boss. Get to work on time.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe, reply using "remove me" as the subject.

No comments: