From Soup To Nuts

An Odyssey Through The Land Of Geekdom

  Home  |   Contact  |   Syndication    |   Login
  421 Posts | 7 Stories | 175 Comments | 1488 Trackbacks

News

Search this blog

Article Categories

Archives

Post Categories

About Me

Friends

Projects

Z-Misc

Well, VSStyler is now ready for download. It is an add-in into Visual Studio .NET 2003 that allows you to save font and color settings into “styles”. This way, you can switch settings at the drop of a hat. I currently use this at work for a presentation/codeReview style and my regular programming style. It allows me to instantly change to either style I wish at anytime. I was hoping that we putting this out on the net, some of you might benefit from it, especially the presenters out there. It is the first add-in I have done with Visual Studio and is the first section of code that I have put out there on the internet, so be gentle okay ;)?

It was originally inspired by a similar add-in done by Roy Osherove. Except with Roy's add-in, there was only one style per file and you have to explicitly import or export to change one style. Regardless, it's a plug in that I found extremely useful at work but I felt I was not in a place to join his workspace and work on the product.

I decided to release this as a GotDotNet workspace so that everyone can have access to the source code and can modify/use it at will (except maybe just give credit were it's due, mm'kay?). You can find the workspace at http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=722d7817-b935-4faf-9bf7-fe3e84d463af

posted on Saturday, February 14, 2004 12:33 AM

Feedback

# re: Visual Studio Styler - Ready for Download 2/14/2004 10:32 AM K. Carter
All I get from the download is an empty zipped file.

FYI


# re: Visual Studio Styler - Ready for Download 2/14/2004 11:05 AM Johnny Hall
Save to File, rather than Open the .zip. It's a known bug.

# re: Visual Studio Styler - Ready for Download 4/5/2004 8:25 AM Rudi
hmm, I just use the build in macro-capability: Tools > Macros > New Macro Project; and past this code in there...

'-----------------------------------------------------------
Imports EnvDTE
Imports System.Diagnostics

Public Module DemoUtils
Private Sub SetEditorFonts(ByVal size As Integer, ByVal family As String, ByVal bold As Boolean)
Dim Props As Properties
Props = DTE.Properties("FontsAndColors", "TextEditor")
Props.Item("FontSize").Value = size
Props.Item("FontFamily").Value = family

Dim clritems As EnvDTE.FontsAndColorsItems = Props.Item("FontsAndColorsItems").Object
clritems.Item("Plain Text").Bold = bold

End Sub

Sub DemoConfig()
SetEditorFonts(18, "Lucida Console", True)
End Sub

Sub NormalConfig()
SetEditorFonts(10, "Courier New", True)
End Sub



End Module
'-----------------------------------------------------------


# re: Visual Studio Styler - Ready for Download 4/5/2004 9:44 AM Jason Olson
Well, a Macro is definitely an elegant way to go. However, for my needs, a macro would not be sufficient.

First of all, your sample doesn't handle colors. While it would be simple to add a "color" parameter to the SetEditorFonts() method, it does not account for different colors (background and foreground) for different properties (I use the white background with large text for demos, and I use a black background with white text (and pastel-like colors for keywords, comments, and such) for everyday coding).

Also, anytime I wanted to create a new style, I would need to go in and write another method. Or if I wanted to change a current style, I would need to go in and change the code. With the VSStyler, all I need to do is open it, select the style and click "Save" and all fonts, color, and such are saved into the styler file.

If you don't need to handle colors, I definitely think that perhaps the VSStyler is a bit overkill when it can be done quite simply in a Macro like shown above. Just my $0.02 though.

# re: Visual Studio Styler - Ready for Download 10/24/2004 8:38 PM P Andersen
I had been looking for something like this, when I came over this site. Unfortunately, when I loaded up the plugin, I couldn't save any files, the "Unspecified Error" popped up and it disappeared when I unloaded the plugin.

Just thought you'd know

# re: Visual Studio Styler - Ready for Download 10/25/2004 5:25 PM Dustin Jones
It worked fine for me.
Do you have any example styles, just to see what other people are using as color schemes?

# re: Visual Studio Styler - Ready for Download 1/6/2005 1:42 PM mike h
great add-in.

I looked at the .styc file hoping to find either RGB or web HEX values for the color settings. What does the value of the color stored in the .styc file represent? Is there a way to convert it to RGB or HEX?

# re: Visual Studio Styler - Ready for Download 1/8/2005 8:50 PM Justin
It worked! I like it. It should have been buit in IMHO



# re: Visual Studio Styler - Ready for Download 1/19/2005 2:18 PM Jason Olson
Sorry for taking so long to respond Mike. The values represented for color in the .styc file are just the way that .NET serializes the color properties in this case, I believe. It's been a while since I looked at the code, but I believe it mostly uses .NET's default serialization capabilities.

# re: Visual Studio Styler - Ready for Download 1/19/2005 2:18 PM Jason Olson
Justin, thanks! I consider that a great complement!

# re: Visual Studio Styler - Ready for Download 2/2/2005 8:29 AM vivek
i like it

# re: Visual Studio Styler - Ready for Download 3/4/2005 9:18 AM Andy Brown
I loved it...while it worked. No combination of closing VS (2003) installs, uninstalls, opening VS 2003, removing the add-in and restarts seem to make it work again. When I click on the little smiley face, nothing happens.

Given that this is an awesome little plug-in I really want it back (and Justin is right, there should be a built-in function like this, and one to collapse only comments using the outlining as well). Any ideas?

# re: Visual Studio Styler - Ready for Download 5/26/2005 5:59 AM Bonna
if anyone has some .styc files i can try out?
Please send them to bonna@pandora.be

I'll show you mine if u'll show me yours!

# re: Visual Studio Styler - Ready for Download 1/16/2006 7:42 AM anand
hi this is ananad

# re: Visual Studio Styler - Ready for Download 3/5/2006 2:08 AM praneeth
nice to use it .


# re: Visual Studio Styler - Ready for Download 5/17/2006 2:25 AM rajnish
gud to use!!
gud luck!!

# A few suggestions 6/23/2006 4:18 AM woz
I'm using VS 2003. There's two things I'd suggest fixing:

1. It seems that the Font family is being saved as "Microsoft Sans Serif" no matter what the current font is when you hit "save".

2. The xml in the .styc file is generated as one HUGE line. For us humans, it would really be helpful to break up those elements into individual lines, indented nicely of course. (That would make it really easy to hand-edit the data.)

# re: Visual Studio Styler - Ready for Download 7/13/2006 5:17 AM Richard O'Neil
I've been looking everywhere for something like this. For your next release, code you include some sample scheme files?

# re: Visual Studio Styler - Ready for Download 8/1/2006 4:54 AM BK
How about a 2005 version?

# re: Visual Studio Styler - Ready for Download 7/20/2007 3:48 AM Hung
Could you show me where i can download it
Now, M$ phased out all gotdotnet's workspaces ?
I asked Google for hours but no download link was found.

Thank you very much!

# re: Visual Studio Styler - Ready for Download 9/11/2007 11:06 AM Mike
This would be nice to have, but with the gotdotnet site phased out, there doesn't seem to be a way to get the plug-in. Is there any chance you could post a link to it?

Thanks,
Mike

# re: Visual Studio Styler - Ready for Download 9/13/2007 8:13 PM Jason
Yes.The gotdotnet site is being phased out.
Where can I get the styler?

Thanks.

# re: Visual Studio Styler - Ready for Download 10/25/2007 1:13 PM Jon Sagara
Hi Jason,

Is there any chance you could upload VSStyler somewhere, perhaps to CodePlex?

Thank you,

Jon Sagara

# re: Visual Studio Styler - Ready for Download 4/14/2008 1:31 PM Pascal P.
Hi Jason,

Did you got the chance to upload your code on another site like CodePlex?

Thanks for your great work.

Pascal.

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 8 and 1 and type the answer here: