Wednesday, March 30, 2011

Re: problem with Key mapping of Ctrl - End.

On 31/03/11 02:45, shuda Li wrote:
> Hi, all,
>
> I try to map the Ctrl - End to move the cursor to the end of file:
>
> map<C-End> :$<RC>
>
> However the line has no effect at all.
> I checked
>
> :map<C-End>
>
> and it returns<C-End> mapped to :$<RC>
>
> I'm wondering anyone has any clues about what causes the problem.
>
> Cheers!
>

Maybe your terminal or keyboard driver doesn't pass the Ctrl-End code as
something that Vim can recognise?

In Insert mode, and with 'showcmd' on, try hitting Ctrl-V (or Ctrl-Q if
your Vim uses Ctrl-V to paste) followed by Ctrl-End. You'll see one of
the following:

1) Nothing (the ^V remains at bottom right)
-- Meaning: the Ctrl-End keystroke is not transmitted to Vim at all.

2) (in gvim) <End>
-- Meaning: the Ctrl-End keystroke is transmitted to gvim as if it were
plain <End>

3) (in console Vim) some garbage-looking characters
-- Hit <Enter>, then Ctrl-V (or Ctrl-Q if...) followed by just <End>
-- If you see the *exact same* garbage-looking characters, then Vim
cannot tell <End> and <C-End> apart because it gets the same byte codes
for both.

(in my Console Vim I see
^[[1;5F
for Ctrl-End and
^[0F
for plain <End>).

4) Something else
-- Maybe you can determine the meaning yourself, possibly with the help of
:help terminal-options
:set termcap

Best regards,
Tony.
--
How wonderful opera would be if there were no singers.

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

No comments:

Post a Comment