Celelibi wrote: > > 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.
Since the terminal emulaters do more than what termcap/terminfo support, Vim has some extensions. See :help xterm-modifier-keys. But this only works for the builtin xterm codes out of the box. You could do this: if $TERM == "screen" set t_kP=<1b>[5;*~ set t_kN=<1b>[6;*~ endif Give it a try. We could perhaps add plugin files for various terminals so that it works out of the box. -- Did Adam and Eve have navels? /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
