You are not logged in.

#1 2008-07-17 00:08:48

mantynel
Member
Registered: 2008-07-16
Posts: 2

Vim arrow keys

Hi,

i have problem with vim. Left/right arrow moves cursor to previous/next word in vim under X.  Under console and also in other apps under X it's working fine: left/right arrow moves cursor to previous/next character. I think last update of vim is responsible for this. I use default settings for vim.

Any ideas?

Thanks

Offline

#2 2008-07-17 00:21:28

Square
Member
Registered: 2008-06-11
Posts: 435

Re: Vim arrow keys

The default keybindings in vim are:
H: Left
J: Down
K: Up
L: Right

Perhaps use those rather than the arrow keys?


 

Offline

#3 2008-07-17 00:43:17

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Vim arrow keys

Go use your arrow keys with emacs you infidel! wink


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#4 2008-07-17 00:48:56

mantynel
Member
Registered: 2008-07-16
Posts: 2

Re: Vim arrow keys

I think, those keys don't work in insert mode.

Offline

#5 2008-07-17 10:40:45

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Vim arrow keys

mantynel wrote:

I think, those keys don't work in insert mode.

That's right, vi is a modal editor. Insert mode is for inserting text. You cannot use the vi editing features while inserting text. Lucky vi has a built in tutoring program.

vitutor

vi/vim does take longer to learn. After the initial mental hurdle, you will wonder why anyone would use anything different.

Last edited by timetrap (2008-07-17 10:42:11)

Offline

#6 2008-07-17 17:22:04

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: Vim arrow keys

As the others have said you really should get used to the H, J, K and L keys if you want to get the most out of Vim. To get out of the habit of using the arrow keys you may find it helpful to add the below to your .vimrc.

" disable arrow keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>

Offline

Board footer

Powered by FluxBB