3 ms·
Thank you for this explanation. It makes sense. But still, I find that vim is overcomplicating things for no good reason. What happened to KISS? Like every time
by crubier 5y ago
Thank you for this explanation. It makes sense. But still, I find that vim is overcomplicating things for no good reason. What happened to KISS? Like every time I make this sort of remark, the thread becomes a thread about vim people debating that actually typing dd multiple time is better, or that dk could do the trick, or that select text followed by d is better, or that d% does the trick, or soon someone will share their custom shortcut that address this particular case, etc. Vim people have to think about Vim way too much.
Meanwhile, keyboard shortcuts on a Mac do compose: arrow=Move, shift-arrow=Select, arrow=a character at a time (or vertically, a line), shift-arrow=a word at a time (or vertically a paragraph) cmd-arrow=the whole line (or vertically the whole file).
Also cmd-d has immense powers when you know how to use it.
And finally let me mention that syntax-aware editing is overrated when you use a linter/formatter because regular indentation and normal shortcuts work flawlessly already.
Last but not least: these shortcuts work system wide! So we don’t have to reimplement every possible software within my text editor so I can use these shortcuts.
- phailhaus 5y agoIt's not like you _need_ vim to edit code. If those are the only shortcuts you need, then you don't need vim! It's just very useful for power users, especially with the huge plugin ecosystem. Instead of each plugin adding its own shortcuts, they often compose together with what you already know to make editing even easier. > syntax-aware editing is overrated when you use a linter/formatter Not quite what I'm talking about actually. Going back to the theme of "code as syntax tree", when editing code you'll often find yourself needing to do things like "ah I should hoist the code in this paren block into its own variable." Vim lets me operate on that syntax level, which feels more reliable to me than using the mouse to carefully select text. I just tell it to delete in parens (which automatically pulls it into a register that I can paste from), move to a new line, paste with "p". When I edit code it's less about individual characters and more about moving blocks of logic around, which is super important for refactoring safely. I end up making fewer mistakes with vim.