5 ms·
I’m a power Vim user. I do not recommend it for code editing. Learn it as a curiosity if you want. It’s also handy for quickly editing over SSH. IDEs with mult
by stevebmark 4y ago
I’m a power Vim user. I do not recommend it for code editing. Learn it as a curiosity if you want. It’s also handy for quickly editing over SSH. IDEs with multiple cursors are so much nicer than Vim.
- bckr 4y agocool, that's a really useful opinion! Perhaps I'll stick with VS Code over SSH, then
- pindab0ter 4y agoThere's no reason to be snarky.
- bckr 4y agoWasn't being snarky.
- azemetre 4y agoThis is odd to hear because the general consensus online is that vim/vim motions makes for seamless text editing. I also feel like multiple cursors is an antipattern, you don't need multiple cursors in vim. You need a macro, which is easy to make and you can pass this to a buffer to modify it or apply it to certain lines or the entire file.
- Lio 4y agoPersonally I love Vim’s visual block editing and use it a lot too. Macros are more flexible but visual block works well in a lot of situations. Either way if one was really tied to multiple cursors Vim and NeoVim of course have plugins that support it. I don’t bother with them myself.
- stevebmark 4y ago> I don't bother with them myself This makes senses, because these plugins are terrible (I've tried them), and if you had used them you wouldn't suggest them as an option. Vim macros are OK, and better than multiple cursors in the minority of situations. If you record a long macro, and you make a typo in the middle, do you know how to edit that typo in the middle of the macro? You probably don't* The answer is you past the macro contents into the buffer, edit it, then yank it back into the macro register. Do you know how to properly yank this so characters are escaped properly and you don't copy the line break and put it in the right buffer? You probably don't* Do you know how to make this processes easy to iterate on so you can trial and test macro changes each time you modify the buffer? You probably don't* * This isn't meant to be a dig at you, it's based on my experience with other Vim users. If you know how to do all of this, shame on me. Most Vim users I see manually go back and try to re-record the whole thing, or don't know how to use macros in such depth. Either way, none of this matters. These are Vim problems only. Multiple cursors are so much nicer, partially because they give you instant feedback, and trivial undo. The only thing I've missed from macros is manipulating numbers, and VSCode plugins that increment in multiple cursors solve 90% of that want anyway. It's so nice not to have editor problems (aka "how do I edit this text in Vim"?) and instead just use the editor seamlessly.
- Lio 4y ago> This isn't meant to be a dig at you, That is, of course, how it comes across, although a fairly mild one. If it's not meant as a dig then I would suggest generalising the phrasing to something like "many people" so that it's not direct at me. As it happens I do know how to copy and edit registers. It's actually something I rarely need though because I can do most multi-line edits using just Vim's visual blocks. That's out of the box with no plugins. I only mention multi-cursor plugins because they illustrate that Vim/NeoVim can and will be taught to every new trick over time, which is one of the nice things about an actually open source editor.