Basic question, CTRL+Wh on Gvim, Win XP

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

Basic question, CTRL+Wh on Gvim, Win XP

Samuel Wright
Hi All,

On my gvim 7 running on Win Xp none of the following work to move to
another window (I'm actually using the project plugin, but I don't
think that's relevant)..

CTRL-W <Left> *CTRL-W_<Left>*
CTRL-W CTRL-H *CTRL-W_CTRL-H*
CTRL-W <BS> *CTRL-W_<BS>* *CTRL-W_h*
CTRL-W h Move cursor to Nth window left of current one.  Uses the
                cursor position to select between alternatives.


If this intended behaviour for Win Xp, or have I enabled this
somewhere? I have behave mswin turned off.

Thanks
Sam
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

Albie Janse van Rensburg
Samuel Wright wrote:

> Hi All,
>
> On my gvim 7 running on Win Xp none of the following work to move to
> another window (I'm actually using the project plugin, but I don't
> think that's relevant)..
>
> CTRL-W <Left>                    *CTRL-W_<Left>*
> CTRL-W CTRL-H                    *CTRL-W_CTRL-H*
> CTRL-W <BS>                    *CTRL-W_<BS>* *CTRL-W_h*
> CTRL-W h    Move cursor to Nth window left of current one.  Uses the
>         cursor position to select between alternatives.
>
>
> If this intended behaviour for Win Xp, or have I enabled this
> somewhere? I have behave mswin turned off.
Just checking - You do realize that in Vim-speak, a "window" is a
section of the current tab, right?  As in, if you open Vim and enter

:split

you end up with 2 Vim "windows".   To switch to another Windows
"windows", you will have to use ALT-Tab as for all applications.
--
[Maturity consists in the discovery that] there comes a critical moment
where everything is reversed, after which the point becomes to
understand more and more that there is something which cannot be
understood. -- S. Kierkegaard
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

A.J.Mechelynck
Albie Janse van Rensburg wrote:

> Samuel Wright wrote:
>> Hi All,
>>
>> On my gvim 7 running on Win Xp none of the following work to move to
>> another window (I'm actually using the project plugin, but I don't
>> think that's relevant)..
>>
>> CTRL-W <Left>                    *CTRL-W_<Left>*
>> CTRL-W CTRL-H                    *CTRL-W_CTRL-H*
>> CTRL-W <BS>                    *CTRL-W_<BS>* *CTRL-W_h*
>> CTRL-W h    Move cursor to Nth window left of current one.  Uses the
>>         cursor position to select between alternatives.
>>
>>
>> If this intended behaviour for Win Xp, or have I enabled this
>> somewhere? I have behave mswin turned off.
> Just checking - You do realize that in Vim-speak, a "window" is a
> section of the current tab, right?  As in, if you open Vim and enter
>
> :split
>
> you end up with 2 Vim "windows".   To switch to another Windows
> "windows", you will have to use ALT-Tab as for all applications.

...and in addition, to move sideways between Vim "windows" (which in
MS-Windows terminology would be called "panes"), you must first have used
":vsplit" (or ":vertical split", ":vertical help", ":vertical diffsplit", etc.).

When I was on XP, all those commands worked perfectly for me. Check

        :map <C-W>

(where <C-W> is five separate keypresses) to see if you haven't remapped
Crl-W. Even if you have, though,

        :wincmd h

should do the same as Ctrl-W h


Best regards,
Tony.
--
"Life would be much simpler and things would get done much faster if it
weren't for other people"
                -- Blore
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

A.J.Mechelynck
Samuel Wright wrote:

> Guys,
> Thanks for the response!
>
> Albie, yes I was talking about split windows. not vim tabs or windows
> apps...
>
> Tony, thanks for reminding me of :map to check what a mapping does.
> Yes, it was mapped in an obscure corner of my vimrc, that will teach
> me to cut and paste 'useful' stuff into my vimrc without checking it
> out completely first.
>
> The :wincmd also worked fine, so I could conceivable remap that if I
> wanted...
>
> THANKS!
> S
>

In general, the safest keys to use for the {lhs} (left-hand side) of mappings
are the F keys. Almost everything else already has a function in Vim. Among
the F keys, F1 is equivalent to ":help<CR>" and F10 is used by some OSes as a
synonym of Alt-Space, but the rest you can use -- if Vim sees them. (On my
Linux system, the window manager preempts Ctrl-Fn and Alt-Fn so I'm mostly
limited to Fn and Shift-Fn).


Best regards,
Tony.
--
"Hit any key to continue" is a lie.
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

Samuel Wright
On 10/04/07, A.J.Mechelynck <[hidden email]> wrote:
> In general, the safest keys to use for the {lhs} (left-hand side) of mappings
> are the F keys. Almost everything else already has a function in Vim. Among

Worth knowing. Thanks. What about when using a leader such as "," or "/" ?

> "Hit any key to continue" is a lie.

lol

S
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

Tim Chase-2
>> In general, the safest keys to use for the {lhs} (left-hand
>> side) of mappings are the F keys. Almost everything else
>> already has a function in Vim. Among
>
> Worth knowing. Thanks. What about when using a leader such as
> "," or "/" ?

The comma does a reverse-search of the last thing you searched
for using t/T/f/F which many folks don't use (so they use it for
leader), but I use regularly.

        :help ,
        :help ;

The forward slash does searching...something used quite regularly.

        :help /

I think the only key that isn't reserved (in that Vim doesn't
already have meaning assigned to it) is the backslash, which is
what the leader defaults to (so in a way, it is used...but only
for the purpose you describe).  I tend to use the default
backslash as my leader (on those rare occasions I use the leader)
because I know it's available and it's vim-portable.

One other candidate might be the underscore, though it's a
shifted key which makes it a little more difficult, it is usually
in a pretty predictable place (unlike the backslash/pipe key
which I find all over the keyboard depending on whose machine I'm
using...makes typing DOS file-paths a pain).

Just my $0.02

-tim


Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

Samuel Wright
On 10/04/07, Tim Chase <[hidden email]> wrote:
> The comma does a reverse-search of the last thing you searched
> for using t/T/f/F which many folks don't use (so they use it for
> leader), but I use regularly.

Yes, have seen , used as leader before. Will look at the other usage
though, as it is not something I've encountered.

> The forward slash does searching...something used quite regularly.

I meant backslash there, should be more careful.

Cheers
S
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

A.J.Mechelynck
In reply to this post by Tim Chase-2
Tim Chase wrote:

>>> In general, the safest keys to use for the {lhs} (left-hand
>>> side) of mappings are the F keys. Almost everything else
>>> already has a function in Vim. Among
>>
>> Worth knowing. Thanks. What about when using a leader such as
>> "," or "/" ?
>
> The comma does a reverse-search of the last thing you searched for using
> t/T/f/F which many folks don't use (so they use it for leader), but I
> use regularly.
>
>     :help ,
>     :help ;
>
> The forward slash does searching...something used quite regularly.
>
>     :help /
>
> I think the only key that isn't reserved (in that Vim doesn't already
> have meaning assigned to it) is the backslash, which is what the leader
> defaults to (so in a way, it is used...but only for the purpose you
> describe).  I tend to use the default backslash as my leader (on those
> rare occasions I use the leader) because I know it's available and it's
> vim-portable.
>
> One other candidate might be the underscore, though it's a shifted key
> which makes it a little more difficult, it is usually in a pretty
> predictable place (unlike the backslash/pipe key which I find all over
> the keyboard depending on whose machine I'm using...makes typing DOS
> file-paths a pain).
>
> Just my $0.02
>
> -tim
>
>

Even the underscore's location may vary. On my Belgian keyboard it is
shift-minus (at far upper right) but IIRC on French keyboards it is unshifted
8. At least it uses at most only the Shift key (which exists on both sides of
the keyboard, not the AltGr key, as (on my keyboard) both \ and | do; and
since they are at far lower left and far upper left respectively, it makes
them only barely keyable with one hand (I usually use my left hand either to
rest my chin or to hold a book I'm typing from :-)  ).

I don't use _ in Vim; it has a function though... move to the first nonblank
of the (count - 1)th line down: sames as +k or <Enter>k

Best regards,
Tony.
--
Did you ever see a "Hit any key to continue" message in a music piece?
Reply | Threaded
Open this post in threaded view
|

Re: Basic question, CTRL+Wh on Gvim, Win XP

Tim Chase-2
>> One other candidate might be the underscore, though it's a
>> shifted key which makes it a little more difficult, it is
>> usually in a pretty predictable place (unlike the
>> backslash/pipe key which I find all over the keyboard
>> depending on whose machine I'm using...makes typing DOS
>> file-paths a pain).
>
> Even the underscore's location may vary.

Ah...good to know.  In supporting our office, all of which have
US QWERTY layouts, I have to look for the backslash on each
machine I visit but the underscore is at least predictably "shift
plus the key to the right of zero which contains the minus and
underscore".  As for the backslash, on one, it's above a flat
Enter key to the right of the ]/} key.  On another it's between
the Backspace and the =/+ key.  On another coughfreakcough
keyboard, it's *between* the single-quote and the enter-key (let
me say I curse that keyboard every time I use it).  Another
keyboard has it down to the left of the spacebar.  Gotta love
standards...reminds me of a certain proposed standard with things
like autoSpaceLikeWord95 footnoteLayoutLikeWW8 where "it's
standard unless I decide to change something for an arbitrary
reason." :)

However, I can't say I ever use the underscore for it's default
purpose (I tried it once and thought "that's not gonna be useful").

-tim