Le vendredi 14 mars 2014 21:13:09 UTC+1, LCD 47 a écrit : > On 14 March 2014, Celelibi <[email protected]> wrote: > > > 2014-03-14 17:58 UTC+01:00, LCD 47 <[email protected]>: > > > > On 14 March 2014, <[email protected]> wrote: > > > >> Le vendredi 14 mars 2014 07:49:31 UTC+1, LCD 47 a écrit : > > > > [...] > > > >> > Do you still have any questions after reading the first two > > > >> > sections in term.txt: > > > >> > > > > >> > :help startup-terminal > > > >> > :help terminal-options > > > >> > > > > >> > /lcd > > > >> > > > >> > > > >> Ok, so. First, if ^[[5~ is interpreted as <PageUp>, why isn't > > > >> ^[[5;2~ interpreted as <S-PageUp>? > > > > [...] > > > > > > > > > Sorry, i'm not used to google groups, I didn't see I replied to only > > > you instead of the group. (Trying to put the address in CC to reply on > > > the group.) > > > > > > > > > > > No idea. Not sure I personally care, either. There are many > > > > layers involved, most of them mentioned in the help page I pointed > > > > you to. Did you get to the point where, say, 'ttybuiltin' is > > > > described? Is your vim compiled to use terminfo to begin with? > > > > Does your shell interfere? Did you try all relevant combinations of > > > > xterm resources? Does gvim work? > > > > > Yes, I tried setting ttybuiltin on or off. > > > Yes my vim is compiled with terminfo. > > > No, my shell doesn't interfer (how could it?) > > > > Your shell is probably linked against readline. Readline > > interfering with curses is not unheard of. :) >
Ok. I just re-did my tests by running: xterm -e vim xterm -e screen vim xterm -tn screen -e vim There should be no shell involved, right? Of course screen uses ncurses, but it's how I want to use vim with <S-PageUp> and <S-PageDown>. But just to eliminate the possibility of ncurses interfering, the third command run vim with environment TERM=screen. Given that my screen terminfo contains the same entries for the caps %e and %c (infos kPRV and kNXT) there should be no difference, right? I still observe the same behavior: works when TERM=xterm, not when TERM=screen. > > > > Xterm works fine, why would I tweak it with some resource. > > [...] > > > > Because Shift-PageUp and Shift-PageDown are typically bound to > > scroll-back(1, halfpage) and scroll-forw(1, halfpage). > Yes they are. That's why I was talking about the key KP_Prior and not Prior. I use the one on the numpad that actually generate the escape sequence for %e and %c termcap. You may try with `xev' to see the symbol associated with the keys. > > > I just tried a little experiment: I added these lines to my vimrc: > > > > inoremap <S-PageUp> S-PageUp > > inoremap <S-PageDown> S-PageDown > > > > With the default xterm translations, they don't do anything. If > > however I also add these lines to /etc/X11/app-defaults/XTerm: > > > > *VT100*translations: #override \n\ > > Shift <KeyPress> Prior:string(\033[5;2~) \n\ > > Shift <KeyPress> Next:string(\033[6;2~) > > > > then pressing Shift-PageUp and Shift-PageDown in Vim in insert mode > > produces S-PageUp and S-PageDown, as expected. This is huge vim 7.4.205 > > without GUI, running in xterm 303. I can reproduce these results on > > FreeBSD, OpenBSD, and Linux. > You're absolutely right, the "real" PageUp key needs this. The one on the numpad don't. And actually, I try to make this work because my laptop don't have real PageUp and PageDown keys. Just to convince you, I tried your inoremap commands without the XTerm resources. They generate "S-PageUp" and "S-PageDown" with the PageUp key of the numpad. But, as expected, they do nothing with the real PageUp keys (when I have one), or they scroll xterm if there is something to scroll. However, when TERM=screen, the "buggy" behavior happen. It takes ^[[5;2~ litteraly as <ESC>[5;2~. And Ctrl+K then Shift+KP_Prior show: [5;2~. And I tried this without a shell as stated above. 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
