On Tue, 20 Jun 2006, Vincent Wang wrote:

Gerald Lai wrote:

On Mon, 19 Jun 2006, Mike wrote:

I am switching from windows to linux for my development environment,
and working on 'porting' my .vimrc file.  I have tons of Alt key
remappings, but I am having trouble getting them working in plain vim
(i.e. not gvim) from a bash shell.

For instance, the mapping

  :inoremap <a-b> foo

does not work because vim does not seem to recognize the alt key.  If
I use the 'Ctrl-V Alt-b' approach, I end up with this:

  :noremap ^[b  foo

which does work, but the :map command show that it really maps to

  <esc>b

However, this is really annoying, because when I want to escape from
insert mode, vim hesitates for a second to make sure that I really
want just '<esc>', rather than '<esc>b'.

Is there a way I can get vim to use alt key remappings, without
mapping them to the <esc> key?  If this is really an XWindows or KDE
config problem rather than a vim problem, then please point me to the
appropriate list/newsgroup/forum.

I am running Vim 6.4.7 in Fedora Core 5.  My shell is KDE Konsole, but
I see the same problem from xterm.


I've addressed this issue of how to make keycodes more responsive a few
times on this mailing list:

  http://groups.yahoo.com/group/vim/message/66414
  http://groups.yahoo.com/group/vim/message/66451
  http://groups.yahoo.com/group/vim/message/69148

HTH :)
--
Gerald

Hi, Gerald
 If you can post this tip to vim's homesite, that will be Great! :)

BR
Vincent

Done :) It's a long one:

  Mapping fast keycodes in terminal Vim
  http://www.vim.org/tips/tip.php?tip_id=1272

--
Gerald

Reply via email to