Associate File Extensions With Specific Languages in Notepad++
[ 29 July 2009 ]
Marked under time savers, windows.

If you use Notepad++ often, you may notice that it recognizes the type of file you open and provides nice synatx style for the language of the file. For example, it knows .js is a JavaScript file and .css is a CSS file. Each file type has its own unique style settings. There are a lot of these predefined file types, but what if Notepad++ doens’t support a file type you open often? If you want to make a custom file type use the same style of another type, just use the Style Configurator to define your own extensions.

Add Custom User Extensions

In Notepad++ navigate to Settings > Style Configurator…

Choose a language on the left side that you want your own extension to match (i.e. if I want .config files to style like XML then I’d choose XML). In the User ext. field near the bottom, enter in your custom user extension without the dot in front of it (e.g. config for *.config files). Now restart Notepad++ and it will map that new extension to the style you’ve chosen.


8 Comment’s on “Associate File Extensions With Specific Languages in Notepad++”

jagpate says:

Thanks. It worked great !!

alex says:

Thank you, I had been looking for this for quite some time! I am glad the internet exists on so many levels.

Rob says:

Since this is about setting .config files to use XML syntax by default in NP++ it would also be worth mentioning how that other file types can do the same here.

I currently have my NP++ XML user extensions set to “aspx ascx ashx asmx config master”. These are the most common .NET files that use XML (or XML like) syntax.

Juan says:

Thanks a lot man!!! It worked well.

Lea Hayes says:

Cheers!

On my system I had to run Notepad++ as an administrator to make this change.

Ryan O'Hara says:

Thanks, I’ve been looking for this for a while now! I wish the settings were a little more organized.

Speak your mind:

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 









Home

 

Article

 

Recent articles

 

Articles marked as

 

Search