Hello!

>>>> I'm a newbie in vim. I'm trying to use it under OpenSUSE 11.0 as
>>>> well as cygwin (WinXP prof. sp3). Unfortunately I found out that
>>>> cygwin version doesn't move cursor through the words with
>>>> CTRL+LEFT, CTRL+RIGHT (while SUSE version does). I tried to
>>>> append the folowing lines to .vimrc file:
>>>> map <C-left>   w
>>>> map <C-right>  b
>>>> imap <C-left>   w
>>>> imap <C-right>  b
>>>> but it had no effect.
> 
>>> [...] In that case, you should first test if Vim sees the codes:
>>> in Insert mode, hit Ctrl-V (or Ctrl-Q if your Ctrl-V is remapped
>>> to the paste operation) followed by the key in question. - If
>>> something appears in your edit buffer, but your mapping doesn't
>>> work, then the problem is probably with your 'term' setting or its
>>> termcap - If nothing appears, it probably means that the OS
>>> (including keyboard driver and anything between it and the user
>>> application) is not passing that keypress event to you.
>>
>> In Insert mode, when I press Ctrl-V first time, the ^ symbol
>> appears. The second Ctrl-V results in V char. So multiple Ctrl-V
>> results in ^V^V^V^V^V^V^V

> No. Try pressing CTRL-V *once*, then pressing Ctrl-Left. The idea is
> that by doing this, you will see exactly what Vim receives from the
> keypress. The point is to verify that Vim receives the keypress at
> all, and if it does that it is what Vim expects. See :help i_CTRL-V
> for details on what we are asking you to do.

Excuse me!
Pressing Ctrl-V followed by Ctrl-Left results in four chars ^[[D
- the first two ^[ are blue and the last two [D are white.
But I have no idea what they mean.


> Out of curiosity, why are you mapping ctrl-LEFT to go one word to
> the RIGHT and vice-versa? (FYI, the reverse should work
> out-of-the-box).  Are you using right-to-left text or something?

You're right, I mistook. Of course, C-left should be mapped to b.

> Also, your imaps wouldn't work even if Vim was receiving the
> <C-Left> properly. You want "imap <c-left> <c-o>w" and "imap
> <c-right> <c-o>b" instead. Otherwise, you'd just insert a w or b
> character into the text with your mappings. See :help i_CTRL-O.

You're right again! Now I enter the following commands
imap <c-left>  <c-o>b
imap <c-right> <c-o>w
but they don't work too.

-- 
Best regards,
 [email protected]                            mailto:[email protected]


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to