Syntax Highlighting Sharing
Follow the instructions below:
- On the source PC, open Notepad++, display its Uder Defined Language panel, and select the language to share.
- Click the Export... button, and enter a file name. The language definition is now in its own .xml file.
- Copy the newly generated file to the destination PC.
- On the destination PC, open the User Defined Language panel, click Import... and choose the file that was just copied.
Versions of Notepad++ prior to 5.7 are not able to import or export language definitions to individual files. The following procedure then applies:
- Open the file with the language to import.
- The language definition is bracketed between <UserLang name=..> and </UserLang> tags. Copy this section.
- Now open userDefineLang.xml and paste the copied text there, just before a <UserLang name=..> tag or the closing </Notepad++> tag.
In the special case where <tt>userDefineLang.xml did not previously exist, the procedure is even simpler: just rename or copy the language file as userDefineLang.xml.
What about highlighting of builti-in languages?
For sharing the syntax highlighting for a built-in language, follow the same procedure as above, but replace userDefineLang.xml wih stylers.xml if using the default theme, or the alternate theme file with your highlighting preferences. Also, <UserLang> tags are named <Language> instead. The new style data should replace the old, becuse the ordering in stylers.xml>/tt> matches the one in <tt>langs.xml.
Note that a theme file contains data for all supported languages; there is no obvious way to mix and match different themes, apart from copy and paste to a new ad hoc file.
When you copy language settings, you also copy the indication of whether the language should be displayed in the Language menu. You can always adjust this sort of issues from the Settings -> Preferences -> Language Menu/Tab settings tab.