How to set the default language in Notepad++
In Notepad++ open the Preferences dialog box by clicking on Settings
-> Preferences
click on the New Document/Default Directory
tab and change the Default Language
to XML
.
EDIT: Just saw that you wanted it to apply to .config files as well. This can be done but you'll need to do it for every extension you want to override. Click on Settings
-> Style Configurator
scroll down to XML
in the language section and add config
to the User ext
box. Save & Close and any new .config file opened will show up as XML. In fact, I've already done that for my installation as seen below:
In the Notepad++ directory look for the langs.xml file.
Find a node like the one below and add "config" as shown.
<Language name="xml" ext="xml xsml xsl xsd kml wsdl config" commentLine="" commentStart="<!--" commentEnd="-->" />
Restart Notepad++ Open a .config file. It should be formatted as XML.
Go to Settings > Styler Configurator. Choose XML from the left-hand scroll list. In the bottom of that dialog, there should be two boxes - one for default extensions and one for 'user extensions'. Add your .config to the 'user extensions' box and click 'Save and Close'.
NOTE: The 'user extensions' might not be available for all language choices (I KNOW it is available for C, since that's the syntax highlighting I use at work). So, if it is not available, you'll have to create your own language file.