Le samedi 15 mars 2014 08:15:34 UTC+1, LCD 47 a écrit : > On 14 March 2014, <celel...@gmail.com> wrote: > > > Le vendredi 14 mars 2014 21:13:09 UTC+1, LCD 47 a écrit : > > [...] > > > > 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? > > > > 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. > > > > Well, comparing your terminfo entry for screen to the corresponding > > entry for xterm, there are plenty of differences: > > > > $ infocmp -d screen xterm | fgrep -vw comparing | wc -l > > 100 > > > > I don't know enough about xterm to be able to tell which of these > > differences are relevant to your issue and which aren't, but it seems > > likely that some of them are, in fact, at fault here. *shrug* > >
I guess you didn't read the debian bug report where I say I tried to swap the content of the terminfo files. So let's try again without Screen or a shell. $ infocmp -d xterm screen | grep -v comparing | wc -l 98 $ cp ~/.terminfo/s/screen ~/.terminfo/x/xterm $ infocmp -d xterm screen | grep -v comparing | wc -l 0 $ cp /lib/terminfo/x/xterm ~/.terminfo/s/screen $ infocmp -d xterm screen | grep -v comparing | wc -l 98 Whatever combination I try with the content of the terminfo files, the behavior is only related to the $TERM environment variable. > > [...] > > > > 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. > > > > Ah, this is an entirely different world of pain you're bringing unto > > yourself here. :) I don't think even the unshifted keypad keys work well > > with the default Vim settings... > If I disable numlock, they work well because xterm produce the same escape sequence ^[[5~ for X events Prior and KP_Prior. > > > [...] > > > 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. > > > > I see. Well, I don't have an explanation for this; it may be a bug > > in Vim, or a problem in your configuration. I don't really care to find > > out; maybe somebody else does. However, this seems to be a good enough > > workaround: > > > > map <Esc>[5;2~ <S-PageUp> > > map <Esc>[6;2~ <S-PageDown> > > map! <Esc>[5;2~ <S-PageUp> > > map! <Esc>[6;2~ <S-PageDown> > > > > It works on my machine, with both TERM=screen and TERM=xterm. > Yes, I thought about it, but it's a bit ugly to put an escape sequence in my vimrc. I could set it only when term is screen, but I think it'd be better that vim does it by itself. 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.