homepage Welcome to WebmasterWorld Guest from 54.166.105.24
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Using Comments to Deactivate Code
HOW - simply, easily comment out code
Debb

10+ Year Member



 
Msg#: 1254 posted 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.

Debb

 

grahamstewart

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 1254 posted 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

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 1254 posted 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

10+ Year Member



 
Msg#: 1254 posted 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

10+ Year Member



 
Msg#: 1254 posted 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.

debb

crosenblum

10+ Year Member



 
Msg#: 1254 posted 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved