Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know... How to get syntax highlighting for a given file extension? - #097

On the Tools – Options – Text Editor – File Extension page, you can map a file extension to one of the included editors. 

Mapping a file extension .sara to an editor

And after mapping the .sara extension to a C# editor, we now get syntax highlight...

.sara file with C# syntax highlighting 

There is also an option to map files without extensions to a specific editor.

Mapping extensionless files to an editor

Technorati tags: ,
Posted: Friday, November 30, 2007 3:00 AM by saraford

Comments

Michael D. said:

In Visual Studio 2008 I can't get syntax highlighting mapped to a file like it does in Visual Studio 2005. IN 2005 I have my .asp,.inc and .vbs extensions mapped to the web form editor. Colorization and Intellisense work great for classic asp. Now with the upgrade to 2008 this doesn't seem to work.

I'm doing exactly the same thing I did in 2005. See link http://pietschsoft.com/blog/Post.aspx?PostID=757

What am I doing wrong?

# November 30, 2007 7:22 AM

Yousuf said:

Hi Sara,

My question is not directly related to the post but this is the only way I could ask this from you.

When we create an aspx page in Visual Studio 2005 and dragdrop a control from the toolbox, most of the times the Visual Studio does not allow us to change the name property of that control, however we can change other properties. For example if I dragdrop a TexBox control on my aspx page, I can change all the property of this control other than the name. What I currently do is to change the name in the markup. Do you know any remedy for this?

Waiting for you answer right here......

Regards,

# November 30, 2007 7:45 AM

lansalot said:

Anyone know why VS2008 isn't syntax highlighting my VBS (vbscript) ? I thought I could add .vbs filetype to this and it would sort it, but no luck. .js files work just fine, what's up ?

# November 30, 2007 8:24 AM

Jason Haley said:

# November 30, 2007 10:03 AM

Brian Dukes said:

If you need to set a file extension to one of the editors that isn't an available option (such as the SQL editor), a small bit of registry monkeying can set you up: http://www.engagesoftware.com/Blog/tabid/297/EntryID/117/Default.aspx.

# November 30, 2007 10:11 AM

Bryan Watts said:

I would love to be able to highlight type parameters.

C# 2.0 looks much clearer because of the light blue highlighting applied to type names. I realized last night that I'm back to black type text with type parameters.

Is this possible? I realize type parameters fall in the "identifier" category.

Thanks!

# November 30, 2007 10:25 AM

JeffCurless said:

Is there any way to add words to highlight?  I want to add my own words like "try_leave". I can see how you can change the coloring for already defined words and types, but can't see how to add new words or types to be colored.

Thanks!

# November 30, 2007 2:03 PM

Ajith Kumar said:

Hey very nice blog for .net tips...

I came here from http://arcanecode.wordpress.com/2007/10/16/go-sara-go/

:)

# December 3, 2007 1:44 AM

jedatu said:

Sara, do you have any insight regarding why Classic ASP/VBScript color coding support was deprecated in VS 2008?

See: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=290845

Or better yet, is there a way around this limitation. Even apps like Notepad++ can color code ASP.  It's hard to believe that VS 2008 can't.

# December 11, 2007 1:09 PM

CHairston said:

No color coding support for classic asp / vbs scripts?

I've read the posts linked here in the comments and found where the VS team said they were being deprecated. Who thought that was a good idea?

INFURIATING.

I won't be recommending my boss buy the new IDE for our team. Microsoft - you're offending one of your staunchest allies - the developers!

# December 18, 2007 2:30 PM

jshark said:

I just got VS 2008 as part of my MSDN subscription, installed it and found this little gem of a "feature".  All of the work we do is "classic" ASP - no need for .NET in our products, so this is pretty much useless for our purposes.

%#$@!* Idgits.

On the bright side - I'll get that 4-5 GB of disk space back when I uninstall VS 2008 and the associated MSDN load (and hopefully not totally bork up 2005 in the process).

# January 4, 2008 10:51 AM

Sara Ford's WebLog said:

In the spirit of both the holiday weekend, I thought i’d mention how Jeff Blankenburg is celebrating

# July 3, 2008 11:54 AM

Секреты Visual Studio said:

Открыв диалог Tools – Options – Text Editor – File Extension (Сервис – Параметры – Текстовый редактор

# March 5, 2009 1:38 AM
New Comments to this post are disabled
Page view tracker