Striking End key within vim prints 'F' (GUI terminal).
Slackware 14.0-32
Hi: from within a virtual console (the consoles given the user just after booting slackware), if I run vim and press the End key the result is the same as pressing $ in command mode (cursor goes to end of line). The same sequence of events started from a GUI terminal gets an 'F' printed. I tried this escape sequence in ~/.inputrc: Code:
"\e[4~": end-of-line # End key |
If you add this to .bashrc it should read .inputrc:
Code:
export INPUTRC=~/.inputrc |
Still printing 'F'. If I say bash does not read ~/.inputrc it's only because writing junk in it I don't get an error when starting a terminal from the GUI, but that's not correct, as opening a virtual console does not give an error either.
|
Code:
$ echo $INTUPRC Code:
if [ -e ~/.bashrc ]; then [edit] Actually that line should already be in /etc/inputrc which bash should automatically source...see this thread for more information, and there is another linked thread there. I haven't read it all. [edit2] If you're getting F printed then the line you want is this one I think: Code:
"\e[F": end-of-line Code:
"\eOF": end-of-line Code:
"\eF": end-of-line |
I wrote a /usr/local/bin/bw.sh:
AUX=$TERM TERM=linux-m vim $1 TERM=$AUX and use alias vim=/usr/local/bin/bw.sh in /etc/profile, so that vim runs with TERM=linux-m (m stands for monochrome) in the GUI. So the stated problem vanishes if I start vim as Code:
$ \vim |
Sorry, I didn't read your post. TERM is set to '/etc/inputrc', where I have the escape sequences, to no avail. But I wrote above what was happening.
|
maybe a weird key mapping from X?
What value do you have for keycode and keysym when running xev in gui terminal and pressing the end key? |
115, 0xff57. But the keyboard mapping works at a low level, and the key is trapped by higher level software. Please remember TERM=linux-m is the immediate cause of the problem here.
|
Is it the same with any X terminal, xterm, rxvt, konsole...?
|
xterm and konsole have the same problem as described. rxvt works nicely in this respect.
|
Maybe $TERM is set differently in rxvt? try echo $TERM in those x terminals to see
|
Quote:
|
Vim doesn't use ~/.inputrc or /etc/inputrc as its initiation file it uses ~/.vimrc. The END key works ok for me in vim (console and gui). Try putting this line in your ~/.vimrc file:-
Code:
nnoremap <END> $ |
Quote:
Trying to see if X is running by script, I wrote Code:
#!/bin/sh |
You're testing previous command which is echo "exit code= $?"
|
All times are GMT -5. The time now is 04:40 AM. |