Muffinresearch Labs by Stuart Colville

vim tip: Fix the cursor keys echoing characters in insert mode | Comments (4)

Posted in Linux/Unix on 15th October 2006, 2:01 pm by Stuart

Occasionally you’ll log into a remote server and find that the cursor keys echo characters when you are in insert mode using vim. Here’s how to resolve it by modifying your vimrc configuration file:

  1. vim ~/.vimrc
  2. i (Enter insert mode)
  3. set t_ku= (now type Ctrl-V and press cursor up)
  4. set t_kd= (now type Ctrl-V and press cursor down)
  5. set t_kr= (now type Ctrl-V and press cursor right)
  6. set t_kl= (now type Ctrl-V and press cursor left)
  7. Press escape to exit insert mode
  8. Ctrl-zz (Saves the file and exits vim)

Post Tools

Comments: Add yours

1. On November 1st, 2006 at 3:37 pm Isofarro said:

After step 6, press Esc to get into command mode (beep mode) first, and then do Ctrl-zz to save and exit.

2. On November 1st, 2006 at 3:40 pm Stuart Colville said:

Well spotted Mike, I’ve amended the instructions. Thanks.

3. On October 23rd, 2008 at 8:00 pm Jonathan said:

I’ve seen a lot of times that this is caused by vim running in compatible mode. You can fix this by editing ~/.vimrc and adding the following line:

set nocompatible

4. On May 29th, 2009 at 5:25 pm Chris said:

Jonathan is correct this is definitively fixed with adding

set nocompatible

to your ~/.vimrc file or even adding:

:set nocompatible

to your /usr/local/share/vim/vimrc file (this is the default file for system wide configuration. Thanks Jonathan, it worked great for me.







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.552s.