I admit, I'm an obsessive commenter of code. I have shortcuts/snippets for html, css, js, CF and php comments. I would love to be able to hit a single shortcut and have webuilder insert the proper comment syntax for the current document type. Perhaps two commands - one for the single line comment type and one for the multi-line comment type (as some langs differentiate between the two). It would appear that webuilder is already aware of what the comment types are from the highlighting scripts so maybe this wouldn't be a huge pain/huge overhead feature? I dunno, obviously.
Not at all a need but just a nice-to-have.
Thanks,
Will
Language independent "insert comment" command
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Re: Language independent "insert comment" command
You mean an extra button on the toolbar that when clicked, enters the correct empty comment code? Doesn't the Insert Comment menu item do that already? I'm not being facetious, I just don't know what comment syntax is for different code types. When I tried creating a new vb, php and asp page, and used the insert comment menu item, it inserted the standard html comment, which I am guessing is not the right syntax for those other code types.
The other thing I use is the auto-replace utility to do stuff like this. I have some set up so that if, for example, I type in xyz, then it relaces xyz with whatever other longer word I don't want to keep typing out; very cool feature for replacing commonly typed elements that are too long and labourious to type every five minutes, like web addresses and things (hey, I'm lazy!)
I don't think I have hit the mark here, probably as I really don't understand the question. Maybe I should just shut up now!
Dave.
The other thing I use is the auto-replace utility to do stuff like this. I have some set up so that if, for example, I type in xyz, then it relaces xyz with whatever other longer word I don't want to keep typing out; very cool feature for replacing commonly typed elements that are too long and labourious to type every five minutes, like web addresses and things (hey, I'm lazy!)
I don't think I have hit the mark here, probably as I really don't understand the question. Maybe I should just shut up now!
Dave.
Re: Language independent "insert comment" command
I believe syrupcore has a point here.
Actually we have started development in this area, but have stopped this because of lot of other things to do right now.
We almost have managed to implement a function that could remove comment marks from selection; or at current line when there is no selection (php, html, css; multi or single-line).
Functionality that inserts appropriate comments based on the current language would not be very hard to implement.
So... If anybody else thinks this should get higher priority, leave a vote here; so we know this feature is really needed.
Actually we have started development in this area, but have stopped this because of lot of other things to do right now.
We almost have managed to implement a function that could remove comment marks from selection; or at current line when there is no selection (php, html, css; multi or single-line).
Functionality that inserts appropriate comments based on the current language would not be very hard to implement.
So... If anybody else thinks this should get higher priority, leave a vote here; so we know this feature is really needed.
Kind regards,
Gatis Avots
Gatis Avots
- syrupcore
- Top Contributor
- Posts: 917
- Joined: Thu Jul 21, 2005 12:58 am
- Location: Portland, Oregon, usa
- Contact:
Re: Language independent "insert comment" command
Thanks Gatis. Definitely not needed. Just a sweetening. ;)Gatis wrote:So... If anybody else thinks this should get higher priority, leave a vote here; so we know this feature is really needed.
And thanks for the ideas Dave. I was thinking about setting up a series of snippets/callwords for each lang. like cp (comment php), ch (comment html), cj (comment javascript) and cmp, cmh, cmc for multiline version. still, being able to hit a shortcut and have webuilder work out the correct comment type would be sweeter, for sure.
Re: Language independent "insert comment" command
I vote for this! I'd like to be able to comment out code using XML in particular... at the moment I have to type in <!--- and ---> arround the tags I want to hide.
- chrisjlocke
- Top Contributor
- Posts: 995
- Joined: Mon Aug 01, 2005 4:12 pm
- Location: Essex, UK
- Contact:
Re: Language independent "insert comment" command
Or you could use a keyboard shortcut to get it to automatically type it for you. Not perfect, but a workaround.kfury77 wrote:at the moment I have to type in...
- syrupcore
- Top Contributor
- Posts: 917
- Joined: Thu Jul 21, 2005 12:58 am
- Location: Portland, Oregon, usa
- Contact:
Re: Language independent "insert comment" command
I did this, and it works pretty well but, even though they're obvious callwords, it's a lot of stuff to remember. The other problem, of course, is that you can't use a callword on a selection. Snippets still seem to be best solution but it's the same number of shortcuts to remember and same number of shortcuts removed from the ever smaller pool of shortcuts! A single shortcut would rule.syrupcore wrote: I was thinking about setting up a series of snippets/callwords for each lang. like cp (comment php), ch (comment html), cj (comment javascript) and cmp, cmh, cmc for multiline version.