notepad++syntax-highlightingmapservermap-files

Notepad++ syntax highlighting for *.map


I can't find how to customize syntax highlighting for mapfiles (*.map files) in Notepad++. I actually have add this syntax file recommended in this post. BUT the syntax highlighting is not good, probably because built for an old version of MapServer (see image below where plenty of key-words are not colored properly). I therefore have 2 questions:

  1. How can I customize the syntax colorization? I can't access to the 'Mapfile' language via Settings > Style Configurator > Default theme (not in the languages list).

  2. How is it possible to make Notepad++ recognize *.map files automatically? When I open such a file, it is colored like a txt file and the extension *.map is not recognized.

Many thanks for help!

enter image description here


Solution

  • I am sure this has been answered somewhere over here or at SuperUser, can't find it right now.
    Go to Languages > Define Your language > select your defined language from the User Language dropdown and set the Ext field with map.

    I have this setup for *.log files : npp screenshot

    To update the highlighting rules select the tabs Keywords Lists , Comment & Number etc and update the rules.

    Update --
    Okay found it here : How can I tell Notepad++ to always use a particular language with a particular file extension