I was looking for a language definition for mapserver ".map" files in Notepad++ but could not find anything.

Is there anyone who can recommend / has such a file? an already defined one?

If not, is there an open source text editor that can highlight .map file code for easy ready in windows?

I searched the web for such editors but no luck yet.

  • By highlight do you mean syntax highlighting? .map files are just text files. Any code editor should do. What do you mean by easy ready? It is not a programming language. – R.K. Jun 10 '13 at 8:27
  • 1
    Yes, syntax highlighting. Even if it is not a programming language I thought such an option might come in handy. If some paid software have support for it, open source text editors could do the same job. I'll just go forward and define one in this case. – Robert Jun 10 '13 at 8:33
  • Yeah. Unfortunately, Mapserver isn't really that famous outside of GIS circles. Saw a language definition for Notepad++ btw. You might want to check my answers. – R.K. Jun 10 '13 at 8:37

Found one for Notepad++. You might have to tweak it a bit as it might be for an old version of Mapserver.

You'd have to create your own definition if you insist on using Notepad++. You might want to check mscompanion though. It has a WYSIWYG mapfile editor and you can instantly visualize your changes. You can find the installer at Google Code. Good luck!

  • Notepad++ is a very useful viewer/editor (SQL) and also comparing files side by side. – Mapperz Jun 10 '13 at 15:13
  • BTW any luck about automatic indentation for map files? perhaps in Vi? – Gery May 26 '15 at 16:09

Found one on GitHub : MapserverSyntaxHighlighting

It adds a user defined language in N++ (check this, if you want to create your own).

Just put the two files given here :

  • userDefineLang.xml -> %appdata%\Notepad++
  • mapfile.xml -> %programfiles(x86)%\Notepad++\plugins\APIs

You may need to restart N++ or reopen the mapfile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.