Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to map the k key to 'down' and the j key to 'up'? This seems much more intuitive to me, since the right arrow will also move the cursor down, if it's at the end of the line.

Why was this mapping decided on? And why does the left / right movement not also take you to the next line like in most other editors?

share|improve this question
3  
1  
Wikipedia suggests the above followed from ^h for backspace and ^j for return, apparently since ancient times. –  Eroen Mar 14 '12 at 6:17
6  
There are a large number of applications that follow the vi/vim as a standard. You are going to drive yourself nuts. –  Zoredache Mar 14 '12 at 7:25

1 Answer 1

You can do it, but this is a Bad Idea™! This is going to cause you grief down the road.

However, if you are dead set on doing this, put these two lines in ~/.vimrc:

:nnoremap j k
:nnoremap k j

As for left/right moving wrapping on lines:

:set whichwrap+=h,l

See :help 'whichwrap' (with the single-quotes), and note that the help says this is not recommended.

share|improve this answer
1  
+1 for "Bad Idea(tm)" –  tidbeck Mar 14 '12 at 10:55
1  
Thanks for the info -- super helpful. But is it only a bad idea because I'll get confused on other systems? I assume that these were put in that order for some ergonomic reason or something. Any idea what it is? (Or is it just history, as comments above suggest?) Thanks! –  Loren Rogers Mar 14 '12 at 17:31
3  
The confusion is basically what is at issue, but don't discount it; this will be more of an issue for you than you realize after you have gotten used to your nonstandard movement keys. There are other problems you may run into with Vim itself, possibly with plugins, for example.. –  Heptite Mar 14 '12 at 19:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.