LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Vim with custom keymaps (https://www.linuxquestions.org/questions/linux-software-2/vim-with-custom-keymaps-701134/)

andorxor 01-30-2009 06:52 PM

Vim with custom keymaps
 
Hello there,

I use Vim with some custom mappings for some keys. This works fine in the lab at uni.

Using the same Vim configuration (.vimrc) at home, I get problems for the following keys for which I have custom maps:
Insert, Delete, PageUp, PageDown, Home, End.

When I press them, their original functions are executed, e.g. pressing the Del key will delete the current character instead of performing my new assignment.

Things I have tested out already:
- Using US keyboard map (instead of native language map)
- Using Xterm as terminal (instead of Yakuake)


I'm using Suse 11.0 with KDE 3.5.9. Vim is running in terminal mode.
Any suggestions for what may cause this are really appreciated.

digitelle 01-30-2009 07:00 PM

open VIM, hit ESC and type :help
Or have a look @ this.

andorxor 01-30-2009 07:35 PM

Please reread my question.

I do know how to map keys. The problem is that the 6 listed keys do not map on my local machine as they should.

An example mapping:
Code:

nmap <PageUp> :bnext
This works fine on Linux at uni, but not on my local machine.

Carsto 01-13-2010 03:28 PM

One conclusion only.
 
Your machine does not read the modifier keys as they should be read. Maybe write a script to report on every key press and run it on both keyboards will show up something. Look for the differences in outputs. The lhs and rhs do not match up with what is epxected by the comment part of the map.

Carsto 01-13-2010 03:36 PM

Will it run on different apps?
 
Vim is an editor if I'm correct. Yet here it is used to modify UTF-8 codes.

Is it correct to assume then that once you have loaded the keymap it will be active on both, say, the desktop and any other app like Open Office and Abiword?


All times are GMT -5. The time now is 05:18 PM.