VIM 7.3 Problem with F1-F10 in terminal ubuntu 10.10

48 views
Skip to first unread message

markus1189

unread,
Mar 16, 2011, 4:03:11 PM3/16/11
to v...@vim.org
Hi,

i have a really strange problem:

When i use vim in the console, the f1-10 is somehow broke:

F1 inserts P
F2 inserts Q
F3 inserts R
F4 inserts S

F5-10 inverts the case

This is really annoying...
Somehow this bug does not occur with gvim

I even tried it with a clean vimrc but no difference...

Maybe the problem is my compiled version of VIM 7.3?

Any help is very appreciated

--
View this message in context: http://vim.1045645.n5.nabble.com/VIM-7-3-Problem-with-F1-F10-in-terminal-ubuntu-10-10-tp3797125p3797125.html
Sent from the Vim - General mailing list archive at Nabble.com.

John Little

unread,
Mar 16, 2011, 11:31:37 PM3/16/11
to vim_use

> When i use vim in the console, the f1-10 is somehow broke:
>
> F1 inserts P

Your $TERM setting does not match the console. By console, I thought
you meant what I get when I type ctrl-alt-f1, but I've got doubts
because in my console the escape sequence for F1 is <esc>[[A, but your
F1 is giving the old vt100 <esc>OP; perhaps you mean konsole, not
console? Or some other terminal emulator? (Ubuntu's usual terminal
emulator is gnome-terminal, but for me F1 starts gnome-terminal's
help, and vim doesn't see it.)

Anyway, in the console, the one you get when not running X (the GUI)
TERM should be "linux", and in konsole and the like TERM should be
"xterm" or similar. Also, your .vimrc could be screwing things up by
setting vim's idea of the terminal, the "term" option. If in konsole
I start vim then
:set term=linux
I get what you get. I'm kubuntu 10.4. In my set up none of my shell
start up files (.bashrc, .profile, /etc/profile, /etc/bash.bashrc)
sets $TERM nor does my .vimrc set term, and it get sets correctly; I
suggest you look for TERM or term being set somewhere. If not, please
tell us what $TERM is before you run vim, and what vim's term option
is set to, and which terminal emulator you are using.

HTH, John

bill lam

unread,
Mar 17, 2011, 1:24:37 AM3/17/11
to vim_use
On my framebuffer term, F1 is ^[OP
I use map #1 to map #12 for mapping F1 to F12, it may also work for you.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

markus1189

unread,
Mar 17, 2011, 5:00:37 AM3/17/11
to v...@vim.org
Actually my $TERM is always xterm and is neither changed in my .vimrc nor
.bashrc

However: This fixed it for me(put it in to my vimrc):

if !has("gui_running") && $TERM is "xterm"
for [key, code] in [["", "\eOP"],
\["", "\eOQ"],
\["", "\eOR"],
\["", "\eOS"],
\["", "\e[15~"],
\["", "\e[17~"],
\["", "\e[18~"],
\["", "\e[19~"],
\["", "\e[20~"],
\["", "\e[21~"],
\]
execute "set" key."=".code
endfor
endif


--
View this message in context: http://vim.1045645.n5.nabble.com/VIM-7-3-Problem-with-F1-F10-in-terminal-ubuntu-10-10-tp3797125p3862482.html

Reply all
Reply to author
Forward
0 new messages