You are not logged in.

#1 2009-09-29 12:32:25

JAcky
Member
Registered: 2009-06-29
Posts: 12

[solved] vi/vim arrow key navigation while in insert mode

A few updates ago vim changed how it responds to my arrow keys while in insert mode.
Now it will print a C when I use left arrow, D for right arrow, A for up and B for down.

Does anybody know how I can get my old behavior back OR how I can goto the end of the line to add something after the last character?

Before the change I could use END to goto the end of the line, press i, then use the arrow right key and start adding information.

Thanks.

Last edited by JAcky (2009-09-29 14:08:47)

Offline

#2 2009-09-29 12:54:57

flytwokites
Member
Registered: 2008-12-04
Posts: 14

Re: [solved] vi/vim arrow key navigation while in insert mode

I got this bug too after pacman -Syu.

Offline

#3 2009-09-29 13:06:32

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [solved] vi/vim arrow key navigation while in insert mode

It's not a bug.  Before the update you were actually using a stripped down vim which has been replaced by vi.  If you need the full vim functionality you'll need to install the vim package.  This got me confused too when visudo opened with different behaviour then before.  There is also a news article on the front page which details a step you'll need to take.

You can go to the end of the line in insert mode by pressing Shift+a by the way.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#4 2009-09-29 13:07:51

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [solved] vi/vim arrow key navigation while in insert mode

Don't use vi, make sure vim is not in compatible mode and make sure your $TERM is sane.

edit:

if you really want to use vi, you could do something like this: http://www.sunmanagers.org/archives/1997/0899.html

Last edited by Mr.Elendig (2009-09-29 13:09:16)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2009-09-29 13:29:17

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [solved] vi/vim arrow key navigation while in insert mode

Ooop, too slow posting. big_smile

There's more on this on thread:

http://bbs.archlinux.org/viewtopic.php? … 93#p620293

Last edited by Gen2ly (2009-09-29 13:30:44)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#6 2009-09-29 14:08:33

JAcky
Member
Registered: 2009-06-29
Posts: 12

Re: [solved] vi/vim arrow key navigation while in insert mode

loafer wrote:

You can go to the end of the line in insert mode by pressing Shift+a by the way.

That works, thanks.

Mr.Elendig wrote:

Don't use vi, make sure vim is not in compatible mode.

I found a post with Google stating that the option should be :set nocompatible but vi did not accept the option ....
Then I realized that ARCH really installs vi when requested where other distros usually install vim and link the vi command to vim.

Thanks for all the help, I'll switch to vim

Last edited by JAcky (2009-09-29 14:09:11)

Offline

Board footer

Powered by FluxBB