Hacker News new | ask | show | jobs
by beizhia 2394 days ago
I know this isn't as simple as what you're looking for, but this is what I go to macros for. Kill the line, paste it twice, move to the first one, comment it out, move down one.

Once you create a macro like that you can run it, name it, save it to your config, bind it to a key, whatever suits your workflow.

I never really thought of how much I do this manually, so I just set it up for myself right now. I'll probably rewrite it as an elisp function though.