Monday, April 5, 2010

Re: CTRL+W under MS Windows

On 2010-04-05, Aarto Matti wrote:
> Hello Tony, thanks for reply.
>
> > - 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.
>
> I tried with two different PS/2 keyboard, for both I had to use Shift key.

It may be the keyboard driver rather than the physical 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.
>
> It's gvim, latest version 7.2. I also tried with clean vimrc, in case
> mine affected somehow. With ssh connection from Windows to console Vim
> in Linux over Putty I have to use Shift too.

That to me is a pretty good indication that the problem has nothing
to do with Vim but is something weird about your Windows
installation.

> > - 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.

Vim may not normally be able to tell the difference between Ctrl-W and
Ctrl-Shift-W, but there is something not normal about this problem.
I wonder what Vim (and PuTTY) see when you type Ctrl-W. Try putting
Vim into insert mode, then typing Ctrl-V (or whatever you have to on
your system to make Vim accept the next character literally) then
Ctrl-W. Do the same with Ctrl-V followed by Ctrl-Shift-W. What do
you see?

> I have given up the idea with mappings. It turns out that every
> shortcut is case sensitive in Windows. I would need to remap way to
> may things.

If mappings work at all, you'd only have to map about 31 Ctrl keys.
I don't think mappings are the right approach in this case, given
your results using PuTTY on Windows to Vim on Linux.

I have used Vim on Windows, with and without Cygwin, and on various
flavors of Unix for several years and have never seen this problem.

Regards,
Gary

--
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: