A quick tip for you this week. Many times when testing and debugging code, it can be useful to comment out a line or blocks of code. TKE provides a quick way to comment out those lines using the appropriate line comment syntax for the current language. Simply select the lines to comment and use the “Text / Toggle Comment” menu command (or Control-i) to automatically prefix each line with the comment syntax. To uncomment a block of commented text, select it and use the same command.
TKE even takes comment toggling further. Without any text selected, using the same toggle command will comment/uncomment the current line. If the current line is commented by a multi-line comment (i.e., the C++ /* … */ syntax), using the toggle comment command will uncomment the entire commented block of text.