Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's much faster to do this with multi-cursor editing in VS code or Sublime Text. And more intuitive and way easier to learn.

Select the $, Ctrl+D to select the other ones, then select and copy the identifiers. Took me 28 seconds in total.



Sincerely, thank you for trying it and sharing "better editing" for everybody! I actually gave it a try and downloaded sublime but got "stuck" after the following:

select $, cmd-d, "enter" (to get them all on newlines), then "$" to replace the lost "$", shift arrows/end to capture "everything", arrow/space over and "cmd-v" for paste, and then I got stuck. (can't "easily" line up the raggedly-pasted items with the multiple cursors and all the cursors seem to "float" weirdly after the paste)

...surely someone more experienced with sublime would know how to "get out of the mess", but I'm more experienced with vim.

I'm wholly not expecting to change your opinion on preferred editor, just sharing a little of the details the make the difference!


Well, to be honest that's where I cheated because I assumed that auto-format would fix it.

In Sublime Text there was an addon that did that. I assume something similar exists for VS Code.

To align the items manually I would Tab (or Space) as much as necessary so that each item has enough space for the alignment. I would then use the mouse to create multiple cursors in the same column. In VS Code it's drag MMB, in Sublime it's Ctrl+LMB or sth. Then Ctrl+Shift+Arrow_Right, Ctrl+Shift+Arrow_Left to select the spaces up until the (misaligned) beginnings of the words, then hit Delete.




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

Search: