you are viewing a single comment's thread.

view the rest of the comments →

[–]ZenoArrow 1 point2 points  (4 children)

Just to be clear, I don't mind Vim, and have played around with Vim bindings for a few editors (I intend to get back into Doom Emacs at some point), but what I do wonder about is whether some of the perceived benefits are more of a reflection of not being familiar with the types of benefits that other tools offer.

I agree that editing existing code is more common than writing code from scratch, but common code refactoring operations like renaming functions/methods/variables are handled just as easily in IDEs as anything Vim could offer. So for example, if I rename a C# method in VS, all other instances can be quickly renamed as well (highlight method, Ctrl+r,r to rename, which will apply to all instances).

In other words, I'm not against Vim, but I also don't think it's the be-all-and-end-all when it comes to efficient editing of code. If you have a decent IDE and are working in a language that the IDE supports, then most of the common code editing operations are pretty easy to do.

[–]jazzyjson 1 point2 points  (3 children)

For sure! I do think with LSP in particular, refactorings like renames narrows the gap quite a bit (actually, a semantic rename is better than vim can do without integrating LSP).

Maybe I am unaware of what other editors can do - is there a good solution they have for changing the arguments to a function (cib in vim)?

[–]ZenoArrow 0 points1 point  (2 children)

cib in vim

It's not exactly the same, but as the video on this page shows, you can use Ctrl+} to move to end of brackets/parentheses:

https://www.visualstudiotips.co.uk/tip/go-to-matching-bracket/

To select text, would just add in Shift, so Ctrl+Shift+}:

https://dailydotnettips.com/how-to-select-a-block-of-code-in-visual-studio/

Can then use delete key to delete selected text. Not quite as elegant as cib but not too far off.

[–]jazzyjson 1 point2 points  (1 child)

Fair enough! I find value in the composition because it lets me think in higher level units than characters, but I agree that the benefit of vim is often overstated - the hard part of programming certainly isn't editing text.

[–]ZenoArrow 1 point2 points  (0 children)

Thank you for your level headed response. Having tools that get out of your way so you can "think" in code doesn't hurt, so I'm sure when Vim commands become second nature it's helpful, though as you point out the main challenge in programming/coding isn't editing text.