Wednesday, March 30, 2011

Re: problem with Key mapping of Ctrl - End.

On 2011-03-30, Tim Chase wrote:
> On 03/30/2011 07:45 PM, shuda Li wrote:
> >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>
>
> Depends on what your terminal is sending. I presume this is
> (non-g)vim rather than gvim.
>
> If it's available through the terminal, the next thing to try
> would be to find out what control+end sends. To do that, type
> ":map " followed by control-V followed by control-end and post
> what it inserts on your command-line. For me in an rxvt
> terminal, it shows
>
> :map ^[[8^
>
> (where the "^[" is a literal escape).

You might also try opening a new line in a buffer and while in
insert mode, typing Ctrl-K followed by Ctrl-End. That will show you
Vim's code for that key. For me, using GNOME Terminal, inserting
Ctrl-K Ctrl-End shows

<End>

which indicates that Vim is not seeing the Ctrl modifier. That is
confirmed by Tim's Ctrl-V Ctrl-End suggestion: both End and
Ctrl-End insert

^[0F

where ^[ is Vim's symbol for the escape character, 0x1b.

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

No comments: