Hacker News new | ask | show | jobs
by 0cf8612b2e1e 679 days ago
What do you do with proper multicursor?

I frequently use it when I need to make some structural changes to consistent code (block replace function name x, add trailing commas, etc). Not sure what more power I am missing.

1 comments

One of the most powerful features of eg Helix is the ability to very smoothly and easily filter inside your existing selections, or to split them.

I think the focus here is on "selections", as opposed to just "cursors".

So for example, you can select all occurrences of X (say, usage of some global variable), then say "for each of these selections, select the whole function", and then say "select the name of the function".

And bam, this is a (somewhat artificial and forced example), but you assembled a list of all functions with a specific property in a few button presses without ever leaving your editor. This is very close to stuff I do all the time in Helix. This is a godsend when it comes to manipulating (for example) a huge array of JSON data.

Maybe this is all obvious to you, but this seems like the kind of thing that probably still feels like black magic to a lot of programmers, and which certainly hasn't reached all editors yet (most are not focusing on selection editing as a first-class usecase).