Language independent "insert comment" command

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
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".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Language independent "insert comment" command

Post by syrupcore »

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
davenz

Re: Language independent "insert comment" command

Post by davenz »

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.
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Language independent "insert comment" command

Post by Gatis »

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.
Kind regards,
Gatis Avots
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: Language independent "insert comment" command

Post by syrupcore »

Gatis wrote:So... If anybody else thinks this should get higher priority, leave a vote here; so we know this feature is really needed.
Thanks Gatis. Definitely not needed. Just a sweetening. ;)

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.
User avatar
kfury77
Posts: 97
Joined: Mon Jun 13, 2005 11:55 pm
Location: Osaka, Japan
Contact:

Re: Language independent "insert comment" command

Post by kfury77 »

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.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: Language independent "insert comment" command

Post by chrisjlocke »

kfury77 wrote:at the moment I have to type in...
Or you could use a keyboard shortcut to get it to automatically type it for you. Not perfect, but a workaround.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: Language independent "insert comment" command

Post by syrupcore »

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.
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.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: Language independent "insert comment" command

Post by syrupcore »

Image

:mrgreen:
Post Reply