Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Using Comments to Deactivate Code HOW - simply, easily comment out code Debb msg:968348 12:01 am on Mar 6, 2004 (gmt 0) Hi - I am a beginning HTML coder. To test alternate ways of coding a line - I copy the line and comment out one of the lines to deactivate it, and then make changes to the other line. Then I revalidate to see if I get any differences.
It seems to me that there should be a simple way to select the line (using the cursor) - and then say 'format this selected text as a comment'. Comment start and end tags would be inserted at the beginning and the end of the line.
I use either Topstyle, or Homesite as my HTML editor. This seems to me as a simple learning tool - does anyone know if such a tool / plugin, etc., is available in ay editor?
Thank you in advance.
grahamstewart msg:968349 12:05 pm on Mar 6, 2004 (gmt 0)
Never used TopStyle or HomeSite but any decent text editor should support macros and search-and-replace with regular expressions.
So basically refer to your help file for how to record a macro that replaces the selected text with <!--
text --> bill msg:968350 12:23 pm on Mar 6, 2004 (gmt 0)
In TopStyle use the key combination: Ctrl + Shift + M That will comment out whatever you have selected. This works in the HTML and CSS editors. griz_fan msg:968351 5:53 pm on Mar 8, 2004 (gmt 0)
Ctrl + Shift + M also works in HomeSite. Simply highlight the section of code, then Ctrl + Shift + M to comment it out. CTRL + Z will undo, making it pretty easy to toggle back/forth. Debb msg:968352 10:06 pm on Mar 12, 2004 (gmt 0)
Thank you very much for the responses.. I certainly have had a DUH moment... I checked help, but I did not check the Edit menu and other menus completely. Thank you again for setting it straight.
crosenblum msg:968353 3:36 am on Mar 14, 2004 (gmt 0)
It's also pretty easy to do in Textpad, at textpad.com. It has macro's, macro programming on the fly, clip libraries, massive and speedy file search and replace.
There are a ton of addons, to ftp the file you are working on to your destination and so on...
It's why i stick with it since 1997.