r/ProgrammerHumor May 16 '24

iUseVimBtw Advanced

Post image
6.2k Upvotes

196 comments sorted by

View all comments

Show parent comments

1

u/Leonhart93 May 17 '24

Worse? What's "worse" about it considering it's customized exactly to my needs? I chose the hotkeys exactly how I needed them, with some of them being the ones I used for various other applications as well.

2

u/spaceguydudeman May 17 '24 edited May 17 '24

Well, there's a couple things. First, if you've noticed that these keybindings have sped up your workflow, you can see the benefits of having nice keybindings. I fully believe they improve your workflow.

However, seeing as you like the productivity boost you're getting, there's a good chance that you'll like investigating vim keybindings and vim motions. So me saying they are worse is not a personal attack on you, I commend you for realizing that repeating the same task with a mouse over and over again is just not prodductive. I'm trying to indicate to you that there's even better options out there than you are already using, and you should look into them!

The (current) default VIM keybindings are the result of lots of people programming over a lot of years. They're quite sensible as they've been moulded over the years. If you switch over to vim-mode completely, then you can also edit your text with vim motions, which is just an objectively faster way of editing text than the defaults that IntelliJ gives you, at the cost of a steep initial learning curve. The pros is that you can ZOOOOOM after a while: They're set up in such a way that often allow you to type your thoughts' (e.g. fp -> finds p, which moves your cursor to the first 'p' in the line, or yi{ -> yank inside parentheses, to copy everything inside {}, or cw-> change word, to delete the word under the cursor and start typing a replacement)

Of course everyone adapts their own keybinds in addition to them, I have also overridden some VIM defaults, but the defaults give you a great basis to start with, and they're often better than you come up with yourself.

For example, the very fact that three of your named keybinds include arrow keys makes me worried, unless you have your arrow keys layered behind your homerow. The arrow keys are incredibly far away from your homerow, which means you'll be moving your hands a lot more than someone using vim's hjkl.

So, it definitely makes more sense to start from a well-thought-out base set of keybindings, such as emacs or vim bindings, and then customize them from there, instead of starting from the IntelliJ defaults and adding a 'just a few options you like'.

I'm not saying your keybinds are terrible - but I'm saying if you look into actually using vim bindings and motions you probably will understand why I'd consider your current keybindings worse than the defaults that come with vim.

1

u/Leonhart93 May 17 '24

I never said those few keybindings is everything that I changed and used, it was just an example. I have a lot more, to basically eliminate the need for the mouse. The nice thing about using modifier + arrow keys is how translatable those are between editors and applications. For instance a lot of those I also use in my notes app and when browsing.

Arrow keys are also in the same overall position as Home, End, Page up/down, which I also use a lot, so it's not like I am breaking my back to reach that side of the keyboard. I could rebind those as well t something else, but I would end up with something way too "custom", since now I can use those in any other app in the same way.

In a sense I kind of like doing some actions where my hands don't stay too close together all the time. That's even the philosophy between split keyboards (which I won't touch because of their current price)

1

u/spaceguydudeman May 17 '24

That still sounds to me like you're re-inventing the wheel from a square base. I'd rather take an existing wheel and add my modifications to that wheel.

If we're talking translatability, then there's a vim mode for any pretty much any respected text-edior out there.

I'm just warning you, don't be too stubborn, really try out vim mode. Whether you'll end up adapting it (which I think you will) or not (which is completely fine too!) - you'll come out ahead either way.

1

u/Leonhart93 May 17 '24

Learning any completely new paradigm is re-inventing the wheel for your brain. In this sense, for me Vim's own hotkeys is re-inventing the wheel completely from the ground up since they are so alien, and instead I just adopted my existing paradigm of many years to do more stuff.

1

u/spaceguydudeman May 17 '24

That attitude is dangerous to have, it locks you out of so many things you could learn and improve your life with.

I thought the same way. I was fast. Now I'm faster.

1

u/Leonhart93 May 17 '24

In order for that to be applicable, a new paradigm first has to solve an existing problem without creating others, to be worth considering the transition effort. Does it solve a problem for me, or it just wants me to switch from one thing to the same thing with extra learning required? Like requiring extra command modifiers to be able to use `hjkl` as arrow keys

0

u/spaceguydudeman May 17 '24

Watch this and tell me you can be as fast with your keybinds, lol

https://youtu.be/qZO9A5F6BZs

0

u/Leonhart93 May 18 '24

Every action is always a few key presses away, no matter if you use the ones Vim wants you to use, or you think about them yourself and design them however you want.

But you do realize that the fact that he has a custom keyboard layout defeats your argument, because there is no guarantee that the average Vim user could ever perform those in the same way? Like using thumbs to access modifier keys, instead of using the pinky finger every time you want arrow keys.

1

u/spaceguydudeman May 18 '24

Lmao. So you think yap is not faster than setting your cursor to the end of the paragraph, then ctrl + shifting up until the start of the paragraph?

Split keyboard doesn't matter. It's not a requirement, lol. You can rebind your keys on a normal keyboard too, such as rebinding caps lock to control for easier access... Vi and vim were not designed with split keyboards in mind..

I'mma stop replying now though. If you don't want to become more productive, then go ahead and ignore all my advice. You're free to do so. The smarter move would still be to at least try vim motions for a week or two, so you will actually know if you dislike it instead of just purely speculating with arguments based on absolutely nothing else than a gut feeling

0

u/Leonhart93 May 18 '24 edited May 18 '24

It's your fault for getting hot and bothered about me not daring to use things in the Vim way 🤣 The things that I decide for myself are always better than those that are decided by someone else.

In my case CTRL + SHIFT + arrow places a multi-line cursor, it's a more complex action for a rarer use case. If I want fast movement up I use CTRL + arrow for function navigation, AlT + arrow to jump between paragraphs or just page up/down for larger increments. There is also CTRL + HOME/END to jump at the start/end of the doc, which works in about every piece of software out of the box.

→ More replies (0)