views:

729

answers:

8

I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics.

This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics.

Is there some kind of registry hack or font magic I can perform to get it to work? The font I'm using is Consolas, if that makes a difference.

Edit: This is possible. See this answer for details.

A: 

Unfortunately not...not sure why they don't let you do that.

You can, however, change the font for just comments. So you could make it something different which will make it stand out more.

You may even be able to make a custom version of the font you use that is by default italic and then set that as the comment font.

Adam Haile
+3  A: 

If you have a font editor, you can change an italic font to pretend it's bold. Here's an example of it. (For VS 2005, but it should work all the same.)

Sören Kuklau
+1  A: 

I dunno how he did it but Tomas Restrepo has a Visual Studio theme that is able to italicize comments and string literals.

This one is in Visual Studio 2005, but the theme editing for both versions appear unchange so it might provide you with some clues as to how to do it on your own theme.

Update: I didn't notice that he had a link to a Visual Studio 2008 version at the bottom of the post.

Jon Limjap
+1  A: 

You can kind of fake it by changing the font to something like the Lucida Handwriting font, which looks sort of italic or, buy or find a free italic only font.

Edit: I've actually gone through the built-in fonts on my VS 2008 on Vista, and chosen Monotype Corsiva, and bumped the size to 12 for my comments setting (getting old - eyes aren't what they used to be)

rjrapson
+2  A: 

The pertinent registry key is

HKCU\Software\Microsoft\VisualStudio\9.0\FontAndColors\{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}  
Comment FontFlags

Default is 0. Putting in a few test values got me various combination of normal, bold, and strike-through text, but no italics. Strikethrough isn't an option in the dialog either, so maybe there is a magic value for italics.

@jon limjap: The VS 2008 version of that theme doesn't italicize comments, just bold.

Factor Mystic
A: 

Adam, as far as I can tell, you can't change the font name for just comments - only the colour, and boldness. If I'm wrong, please tell me!

Blorgbeard
+1  A: 

I got it working, here's how.

Blorgbeard
+2  A: 
Jon Galloway