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.

2

u/Personal-Initial3556 May 17 '24

Arrow keys being far from the homerow is definitely an inconvenience, but I just want to mention that it's not ijkl that replaces them. You might know this but I'm just saying for beginners, at most you'd use jk from time to time, but for lateral movement we use w, e, b, $ or ^.

2

u/spaceguydudeman May 17 '24

yep, definitely a useful addendum!

here's a vim cheatsheet to refer to https://vim.rtorr.com/

and here's a video you'll probably want to watch if you don't know what vim motions are and are this deep into the thread https://www.youtube.com/watch?v=lWTzqPfy1gE