Comments:"Alexander Brevig : The //* /*/ //*/ comment toggle trick"
URL:https://coderwall.com/p/zbc2zw
DISCLAIMER:
This is a trick. Do not adopt this trick in production code. Use it wisely while you're doing proof of concept and the like.
So, I guess I'm not the only one that need some way of easily toggling code in and out of the code.
This trick below can be used to toggle between two sets of code, with one symbol in the code with no additional short-keys to learn, and no tool dependencies!
//* /*
someCode(); someCode();
/*/ /*/
someOtherCode(); someOtherCode();
//*/ //*/
Here is a version for simply commenting code in and out:
Activated:
//*
someCode();
//*/
Deactivated / commented out:
/*
someCode();
//*/