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

What does it mean to paste a function around some lines of code? As in what're the manual steps you do because that's not possible today?


I assume auto-wrapping a copied function signature around a selecting block as if it was just parentheses or something. I don't think I ever needed that, but a variant of that might be useful for XML where wrapping something in a pair of tags is a common operation.


Mostly I would find this helpful during refactoring where it’s normal to move some code out in to a specific function. It would also be helpful for loops, if/else, validation, try/catch since you could copy the boilerplate and paste it over the code block in one move.




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

Search: