Closed yunlongYoung closed 4 years ago
You're free to configure this yourself! (I think it's unlikely that it will ever be merged into the kakoune repo, but you can release it as a plugin if you think others find it helpful)
Here's a script to get started with:
# ijkl as up left down right, and then move (i)nsert to h
map global normal i k
map global normal j h
map global normal k j
map global normal l l
map global normal h i
map global normal I K
map global normal J H
map global normal K J
map global normal L L
map global normal H I
map global normal <a-i> <a-k>
map global normal <a-j> <a-h>
map global normal <a-k> <a-j>
map global normal <a-l> <a-l>
map global normal <a-h> <a-i>
map global normal <a-I> <a-K>
map global normal <a-J> <a-H>
map global normal <a-K> <a-J>
map global normal <a-L> <a-L>
map global normal <a-H> <a-I>
No need to implement an option, you can re-map the keyboard at will, e.g.
map global normal h i
map global normal j h
map global normal k j
map global normal i k
I thought that because from begining, the designer of vi take 'i' as 'input' for it's easy to remember. So designer use 'hjkl' to handle (←↓↑→).
Actually, there's a really good reason why vi uses hjkl for movement.
@Screwtapello Sure, maybe nowdays I found it's hard to use 'hjkl' with my intuition... But Bill Joy found hard to use 'ijkl' as well for historical reason.
Just some people like me and the new users will think 'ijkl' is useful. A lot of fps games are use 'wasd' as well. Maybe a option would be friendly for these newers.
In the page you cited, they also metioned why heavily use escape key. Acturely, I use Caps instead escape, maybe others use 'jj' or ctrl+'[' instead.
A option could useful for new users,.Because it's unlikely for new users to think about this, they will just accept everything. Just like me accept 'hjkl', and after three years find it's hard to use for me.
It's easy, friendly, and new.
new users should learn how to use the tool, not to make the tool act like its something else. you are free to remap anything to anything. you can make a plugin for new users that does that.
new users should learn how to use the tool, not to make the tool act like its something else. you are free to remap anything to anything. you can make a plugin for new users that does that.
must be a gnomedev here , they think that way to. however, the only reason every vi under the sun uses the moronic hjkl as the default movement keys , has nothing to do with a thought trough solution to a problem... its just a relic from a time where keyboards did not have dedicated arrowkeys for cursor movement, and every terminal used a different set of keys to function as arrow keys , hjkl just happened to be the combination of the terminal the creator of vi used. nothing more ( http://xahlee.info/kbd/history_of_vi_keys.html ) that being said i do see the use in some easily accessible keys from home row ... what those should be i leave in the middle , however they should take into account: -the most used cursor movements are : down and left , under no circumstance they should be operated with the same finger, (one of the reasons hjkl is horrible) -keep travel to a minimum , especially for the poor pinky if used. ( 'y,.\ ' would be a bad choice) -feel logical, : a to go right and ; to go left would be bad
while i would support the op's proposition jikl, it does require i to also be remapped , possibly starting a chain reaction of remaps
i would suggest using jkl; <v^> or <^v> instead, the ; key is unused as far as i know, , in combination with shift (:) it starts a command but on its own would work fine.
offcourse i understand that you can remap these , so its not an excuse for not changing the defaults to something moresensible then that idiotic 100yo default, heavy vim fanatics have assured me in the past that "they almost never use the direction keys anyway" so they wont even notice , however, by changing the default , you would help allot of newcomers to a vi like editor, kakoune does some really good stuff in that direction IMHO anyways (like the +onemore ,
(don't wanna start an issue for this but if you like me to): maybe its also not a bad idea to take control of the esc and caps lock keys , so they don't require outside remapping but allow mapping and remapping inside the config files. maybe even defaulting caps-lock on to one mode and of to the other mode , many users there left pinky would thank you allot if you did (especially people with small hands that in order to reach esc have to leave homerow with their hands)
gnomedev would remove hjkl without alternative.
The problem I have used vim for 3 years, but until now aways get wrong to use 'j' & 'k', I often will stop for a while to think about whick key is up/down, is that 'j' or 'k'? sometimes I will press 'j' & 'k'to try it out.
I thought that because from begining, the designer of vi take 'i' as 'input' for it's easy to remember. So designer use 'hjkl' to handle (←↓↑→) . But it's not conforming our intuition very much.
The solution Add a option for use 'jkil' to substitute 'hjkl', for its shape like direction keys on keyboard(←↓↑→).
And this opiton will complete swap function of 'h' and 'i' as well('H' and 'I' etc.).
The reason for use 'jkil' and not to use 'hjuk' to handle (←↓↑→) is that we often put our fingers on 'jkl' but not no 'hjk' when we doing nothing.
And the new navigation more esay for new user, and even for experienced user it's quick to learn.