|
I've been using vim forever, and often use "advanced" editing techniques: macros, .-repeat, :g/.../norm ..., occasional templates. For certain projects I'd used `vscode` (with the vim plugin!), and there's definitely some helpful bits. The biggest helper for me is/was the `F2-rename-symbol` capability. Being able to "rename" securely in the whole file (or function), and across the project is super-useful. Working with Cursor and the autocomplete is (often) pretty shockingly good. eg: when I go to rename `someVar` to `someOtherVar`, it'll prompt to `<tab>` and: * rename the function call
* edit the log lines
* rename the return object value
* ...etc...
In vim, I'd `*` to automatically search for `someVar`, then `cwsomeOtherVar`, (change-word), then `n.n.n.` (next, repeat, etc.)...so my overhead (by keystrokes) is `*` (search), `cw` (change word), (`n.`) next-and-change. Five "vim" characters, and I mentally get to (or have to) review each change place. In straight `vscode`, I can do `F2-rename` and that'll get me replace _some_ of the variables (then I still have to rename the log lines, etc). With Cursor, I make the `cw...` and it's 90%+ accurate in "doing what I probably also want to do" with the single `<tab>` character. It gets even more intriguing where you'll say `s/foo/fooSorted/` and it automatically inserts the `\*.sort()` call, or changes it to call `this.getFooSorted()` or `this.getSorted( foo )` or whatever. For "cromulent" code, cursor autocomplete is "faster than vim". For people that can't type that good, or even that can't program that good, it's a freaking god-send. Adding in the `Agent...` capabilities (again, for "cromulent" code)... if you're just guiding it along: "Now, add more tests" => "Now 50% more cowbell!" => "Whoops, that section would be more efficient if you cached stuff outside the loop." Even then, I have to have some empathy with the AI/Agent coding, "Hey... you messed up that part (btw, I probably would have messed up that part the first time through as well...)". We can't hold them to gold standards that we wouldn't meet either, but treating them as "helpful partners" really reduces the mental burden of typing in EVERY SINGLE CHARACTER by yourself. |
The line in my nvim config that sets up the LSP "rename" is:
I mention this because in spite of using vim/neovim for over 20 years, I still learn new things (from HN comments and elsewhere) -- which is part of why I love it.(To your larger point -- I concur... btw)