Skip to content

How to enable syntax highlighting in Visual Studio

Microsoft Visual Studio has a syntax coloring feature in that makes files such as .c, .cpp, .h, .hpp, etc, easier to read by adding colors to the source code. By making some minor modifications to the Windows registry, it's possible to enable syntax highlighting for files that are treated as standard text files, such as .java and .php files.

The following .reg file configures Microsoft Visual Studio 2003 .NET to enable C++ syntax highlighting for files with the PHP extension.:

Windows Registry Editor Version 5.00
;
; Add syntax highlighting for .php files in Visual Studio 2003
;
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.php]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"

Download

Download the .reg file and run it to enable the syntax highlighting.

Comments

George Walsh writes

8 thumbs

Thank you! This little registry hack was just I was looking for.

# 26 Jan 2009, 8:00

Leave a reply