Home Download Buy Blog Forum Support

Custom comment formatting (like VS10x Comments Extender)

Custom comment formatting (like VS10x Comments Extender)

Postby SeanWcom on Mon Aug 22, 2011 1:56 pm

I posted this on the UserEcho site as well, but it might make more sense to make this a plugin instead. I know next to nothing about Python - but I love learning new languages, so I'm going to dive in this week and see what I can figure out. However, I know some of you guys are gurus. If anyone think this idea is as awesome as I do, please run with it! :)

One of my favorite extensions for Visual Studio is called VS10x Comments Extender. It allows you to setup custom formatting for comments that are typed in a certain manner.

From the VS10x page:
How does it work? Well, when you start a comment with // (C#, C++, F#) or ' (VB), you can add some extra characters (minimum one, maximum three) in order to define how this comment will look like. VS10x Comments Extender will interpret these prefixes and format the comment accordingly.

* Note that this should be extended to support as many languages as possible, not just those listed in the quote above.

It REALLY helps to see this in person... There's a very simple screenshot below, but there's MUCH more it can do. Click the link below to see examples in action for everything else it can do.

Source/All Examples:
http://visualstudiogallery.msdn.microso ... ?SRC=VSIDE

Simple example:
Multiple selections... one of my favorite ST2 features. View some noob-friendly screen casts here.
Posts: 101
Joined: Wed Aug 03, 2011 1:31 am
Location: Georgia

Re: Custom comment formatting (like VS10x Comments Extender)

Postby adzenith on Mon Aug 22, 2011 5:28 pm

I believe that the only way to change text formatting (i.e. color) in Sublime Text is through grammars, not through plugins. It may be that you have to create a custom grammar for each language whose functionality you want to extend in this way. Also you can't do strikethroughs or change font size or style of individual characters in ST2.

However, this does look pretty sweet. I'd use it. I think ST2 needs some additions before it becomes really viable though. But I could be wrong! Try it out and let us know what you discover.
Posts: 1403
Joined: Mon Oct 19, 2009 9:12 pm

Re: Custom comment formatting (like VS10x Comments Extender)

Postby digiduck on Wed Aug 24, 2011 7:53 am

This would be sweet. I'd imagine being able to manipulate text styling via plugin would open up a lot of cool possibilities. I hope this is added at some point.
Posts: 19
Joined: Mon Aug 08, 2011 1:27 pm

Re: Custom comment formatting (like VS10x Comments Extender)

Postby wasatchwizard on Wed Oct 16, 2013 4:47 pm

I would love to have this (for comments as described in this thread) as well as numerous other features I would like.

Does anyone know if this is possible in ST3?
Posts: 2
Joined: Thu Aug 01, 2013 5:45 pm

Re: Custom comment formatting (like VS10x Comments Extender)

Postby quodlibet on Wed Oct 16, 2013 5:49 pm

Off the top of my head, I'd say this is possible, but perhaps too much a of hassle.

You would need an to create a syntax for the VS10x-style (pretty easy) and then hack the default syntaxes for whatever language you want to hook into the custom comment syntax (not sure how hard this is).

Also: I'm thinking about single line comments. Multi-line comments might be trickier.

Posts: 576
Joined: Sat Jun 18, 2011 5:53 pm

Return to Plugin Development

Who is online

Users browsing this forum: DrLlap and 7 guests