Ask Your Question
1

Key mapping in vim

asked 2011-11-16 05:18:58 -0500

hp4 gravatar image

updated 2014-09-28 09:10:48 -0500

mether gravatar image

I have an old .vimrc with my own key mappings which worked fine in the past years, e.g. in SuSE.

After installing Fedora 16 (I've no experience with previous releases) I run into troubles with vim startup. The first problem I've analyzed:

map-commands for S-F2 to S-F4 seem to be accepted according to the map-display, but when pressing the corresponding key a string "1;2S" is inserted into the current file.

Does anybody know how to map the function keys S-F2 to S-F4 in Fedora? The other function-keys seem to work.

BR HP

edit retag flag offensive close merge delete

Comments

What the heck is S-F2? ;-) Ah shift! My wild guess is - GNOME3 steals this key.

lzap gravatar imagelzap ( 2011-11-16 05:53:44 -0500 )edit

Can you please send the whole macro so I can test it in my Vim. It seems you have some type there.

lzap gravatar imagelzap ( 2011-11-16 10:40:10 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-11-16 05:57:22 -0500

lzap gravatar image

Works here on Fedora 16, default installation, Gnome 3.

I tried with this command in GVim:

:map <S-F1> :echo 'Hello'<cr>
:map <S-F2> :echo 'Hello'<cr>

Both works. Try that.

edit flag offensive delete link more
0

answered 2011-11-16 07:11:03 -0500

hp4 gravatar image

I tried it with copy and paste but doesn't work in my environment.

Still vim switches to insert mode and enters "1;2Q"

But it works fine for <s-f5&gt; and="" above.="" maybe="" some="" dependencies="" on="" terminal="" or="" termcap="" terminfo="" definitions?<="" p="">

I installed it yesterday with some additional packages from several areas.

edit flag offensive delete link more

Comments

Please use comments for commenting. The problem is not in vim, but your environment. Is it Gnome 3?

lzap gravatar imagelzap ( 2011-11-16 08:37:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2011-11-16 05:18:58 -0500

Seen: 556 times

Last updated: Nov 16 '11