Hacker News new | past | comments | ask | show | jobs | submit login

Multiple cursors wont do what the parent comment is talking about without a lot more work.



Why? You can copy and paste the entire section, and use multiple cursors to add in the brackets.

going from

     a: 'one',
to

     a['one'],
just requires you to add two brackets and remove the colon. With multiple cursors you can do that exact same operation for all lines in a few keystrokes.


It's having to go find the other block you want, copy and paste it, and then set up the multiple cursors and type, versus it just happening automatically without any of that.


In my use cases I’ve long moved on from writing the original hash. Having it autocomplete without having to open a file and tab back/forth (or find then copy/paste a block to the other file to temporary work on it) etc.

But what's lost in my over simplified example is the contetxt is usually way more involved. I'm usually passing those as arguments to some function or other unique syntax situation that a glorified find and replace can solve. It's all about doing it in the times you would never think even bother writing a custom command because typing is faster given the unique syntactical context... The only thing faster then is autocomplete.

I'm not actually recreating a new hash with the convienient same format.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: