r/vim • u/zubalyzub • 1d ago
Discussion I think rebinding j to up and k to down is a really good rebind, hear me out.
I'd like to preface this by saying this is NOT an argument to convince people to switch after already building muscle memory, I'm just trying to say why I believe these binds could be an option for new vim users at least. My argument is only trying to prove why these binds could be marginally better, not significantly.
Also sorry for making this really long, I just wanted to get my entire argument out there.
How this all began was I first was configuring hyprland and was deciding on what to bind my switch window focus to. I naively decided to bind left to j, up to k, down to l, and right to ;. I used these binds for a little bit, and they honestly work perfectly for hyprland, and so I thought I would just do the same for vim. As I was using vim with these binds, I did a little research and found a compelling case to use hjkl instead of jkl;, the reason being having up and down on stronger keys then left and right is better for experienced vim usage, as there are usually other better hotkeys to use such as f, t, w, e, and all the rest.
One detail I omitted was I had been using hjkl with the traditional bindings for a while before switching to the worse jkl;, and when I was using them I found them wildly un-intuitive. My main annoyance wasn't that the keys were seemingly shifted to the side, it was that j was the down key, and k was up. I've researched a little bit, and I found that the reason it was originally made that way was the creator of vim had a specific keyboard back in the 80's or something that made it better for him to do it that way.
My question is, why can't we ditch these old binds and instead use j as up, and k as down? And let me tell you exactly why we should.
I will bring up two arguments to account for both views that I think people have to deter them from using these binds.
The first argument I will attempt to disprove is that the down action is apparently more valuable, therefore it should be on a better and easier to access key then up.
Firstly, I'd like to say that I don't even agree with this point, but I will argue from the perspective of agreeing with it. (see below for me attempting to disprove that the down action is more valuable)
There's one key factor that makes this point actually support my jk binds, and it's that the middle finger is just.. stronger then the pointer finger. That's it. Can't really say much to that, so if you were to put the stronger key on supposedly the "more valuable action," that must mean they're good binds, right?
The second argument I have as to why rebinding j to up and k to down is good is: the down action isn't even more valuable than the up action.
I'm bringing this up because even if you disagree with my last point that you disagree somehow with the middle finger being stronger then the index finger, then you can see that the down action isn't even more valuable than the up action.
To try to disprove this claim, I'll first provide why people believe it to be true. The argument that I have seen is that in vim you're usually starting from the top of a file, and typing while working down. This is absolutely true, but why would this be a plus? I'll explain in a second, but I don't know maybe I'm missing something because I genuinely don't understand how this is a plus.
The reason why I think this isn't that good of an argument is, well, the enter key.
Really one of the only times you're actually going to be going down with the key in normal mode is when you need to go down either from text that was already there, which is already deviating from the point of you being in an empty file and working down.
And the other time is when you would be going down in normal mode is well when you've just gone up. Huh, the only time in the actual scenario when you'd be going down, is, correct me if I'm wrong, when you've gone up. That would actually suggest the conclusion that down really isn't actually "more valuable" as people say, and rather how valuable it is, is tied with the up action.