Le samedi 15 mars 2014 13:55:22 UTC+1, Bram Moolenaar a écrit :
> Celelibi wrote:
> 
> 
> 
> > I reported a bug in the debian BTS, but found that it also apply to
> 
> > upstream vim.
> 
> > 
> 
> > Here it is: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741400
> 
> > 
> 
> > In summary, it looks like vim do not support termcaps %e nor %c
> 
> > (corresponding to terminfos kPRV and kNXT). They're supposed to
> 
> > produce <S-PageUp> and <S-PageDown>.
> 
> > 
> 
> > I think vim only produce <S-PageUp> or <S-PageDown> when it has an
> 
> > exception for the given terminal. i.e. when it recognize the content
> 
> > of the environment variable TERM and has a special case for it.
> 
> > 
> 
> > I tried to look at the source code, but it's too complicated for the
> 
> > amount of time I spent.
> 
> 
> 
> What makes you think that %e and %c are the shifted next/previous page
> 
> keys?  The termcap manpage says:
> 
> 
> 
>        kN   Key for next page
> 
>        kP   Key for previous page
> 
> 
> 
>        %c   shifted next key
> 
>        %e   shifted previous key
> 
> 
> 
> "next key" and "next page" are different.  Perhaps it's just a
> 
> coincidence that %c and %e contain the codes?  Officially there are no
> 
> entries for the shifted next/previous page keys.
> 

Yes, you're right. But I don't think it's a coincidence that xterm produce 
^[[5~ for Prior or KP_Prior and ^[[5;2~ for Shift+KP_Prior. I think xterm just 
do the most sensful thing it can. Since there is no termcap for "shifted 
previous-page" it send "shifted previous" with an escape sequence that is 
nothing else than the escape sequence for "previous-page" with shift modifier.

- Maybe what I should ask is that vim treat the "previous" key as an equivalent 
of "previous-page"? Or at least a way to tell vim that I want them equivalent 
whatever the modifiers it may encounter.
- Or maybe that it loads ALL the termcap in the t_* options? And that it search 
for a termcap that match the FULL escape sequence before trying to parse the 
modifiers and search for the modifier-less version?

What I mean for the second suggestion is that when I :set t_%e=^[[5;2~ then 
<C-K>^[[5;2~ make vim print <S-t_%8>. While %e is in the termcap/terminfo file.


What really happen is not really clear in my head. Neither is the design of 
vim. I'm therefore a bit confused about the right way to go.


Celelibi

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui