Code: Select all
map j <Left>
map k <Down>
map l <Up>
map ; <Right>
[code]Mystic0 wrote:Why on earth did they decide to map h, j, k, and l to left, down, up, and right? This means that every time I want to move, I have to lift my hand and move it away from standard typing form! Shouldn't left, down, up, and right be mapped to j, k, l, and ;? I know that ; conflics with :, but that is only when caps is on.
You definitely can't blaim the vim developers for that one. That has been part of vi for at least twenty years, probably longer. I imagine the original key mapping was either choisen somewhat arbitrarily, or based on a program that existed before vi... I've tried remapping the other way, and I have found the hjkl mapping what I find most comfortable. The reason is the pinky is a weak finger. If I press down with it regularly I get a sore hand. It is much more comfortable to reach my index finger over to the h from the j. It does not require moving the rest of my hand, but I do have large fingers. In anycase, when actually typing text you need ^H to erase mistakes, so at least people at the time of vi's development were used to pressing h to go back. Perhaps now, more people use the backspace key, because they aren't use to environments where ^H works.
Bill
Also note that when not in Insert mode, the rubout key (that was a common name for backspace when vi was youngdocbill wrote:In anycase, when actually typing text you need ^H to erase mistakes, so at least people at the time of vi's development where used to pressing h to go back. Perhaps now, more people use the backspace key, because they aren't use to environments where ^H works.
I think Anior hit the nail on the head here. Infact I was thinking of posting the same until I read his commentAnior wrote:H, J, K and L are found on the same place on all qwerty-keyboards I have found. ";" moves around a bit. On swedish keyboards that key is used to type "Ö".
Code: Select all
setxkbmap [us|dvorak]
Code: Select all
loadkeys [us|dvorak]

farrioth wrote:This is a historic thing from Vi. I use arrow keys personally. Fell free to remap them. Some people like j, k, i, l (left, down, up, right).
Mapping is performed by "map char func" in .vimrc, so:Code: Select all
map j <Left> map k <Down> map l <Up> map ; <Right>

Code: Select all
-rwxr-xr-x 1 urban vatican 9500966 May 26 19:39 vim
-rwxr-xr-x 1 urban vatican 207218 May 26 19:36 ex