Jiang Qian <[EMAIL PROTECTED]> wrote on 2006.07.31 15:32:15: > Hi All: > I've been out of clue with this one: I have a thinkpad notebook, which > has backward and forward key just above <arrow back> and <arrow> > <forward>. > > In X, I add the lines to ~/.Xmodmap: > keycode 234=F19 > keycode 233=F20 > to map the two keys to something useful. If I use gvim and type the > Forward and Backward key in insert mode, it indeed generates <F19> and > <F20> on screen. > > However I always use vim under gnome-terminal or xterm. Sometimes I > accidentally hit the forward backward key, they capitalize to the > end/beginning of the word, whether I'm in normal or insert mode. I find > it extremely annoying. I'm trying to disable this. > > And if I type ctrl-v in bash shell and then hit the forward/backward > key, it generates ^[[33~ and ^[[34~ which I assume are the literal > keystroke I'm sending to the terminal. However how do I map these into > something useful such as the <Left> and <Right> key, or instead the map > them to do nothing at all? > > If you need more info do diagnose the problem, please let me, too! > > Thanks a lot in advance. > > Jiang
Hi, It is safe to just map the ^[[33~ key like the following: if &term == 'xterm' map ^[[33~ <Nop> map! ^[[33~ <Nop> endif Map them to <Nop> just disable it, Map them to <Left> also works. Note that you need to use ctrl-v to input that character sequence ^[[33~. HTH. BTW: its good to see (possibly) chinese name in Vim forum, and I'm glad to see a chinese still using her real name abroad. -- Sincerely, Pan, Shi Zhu. ext: 2606