Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

Thank you for your time,

share|improve this question
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
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
Ok, will try this one out. Thanks! – Robert Jun 10 '13 at 8:38
up vote 5 down vote accepted


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

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!

share|improve this answer
Actually, your recommended definition works quite well. Thanks! – Robert Jun 10 '13 at 8:43
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.

share|improve this answer
We prefer long answers here. please expand your answer or it is likely to be removed. – Brad Nesom May 26 '15 at 15:49
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – John Barça May 26 '15 at 16:00
@BradNesom : the question is pretty clear, and readers do want short answers. I added more explanation (which nothing else than the readme), but to me this is useless. – Dude Pascalou May 26 '15 at 16:03
@JohnBarça : The only thing I can see to do here is to add the files content. Is this really what you want ? – Dude Pascalou May 26 '15 at 16:06
I added even more explanation. For me, this answer is becoming a tutorial and is not easy to read anymore. Moreover, this is not the goal of a stackexchange question/answer site. Please remove your downvote. – Dude Pascalou May 26 '15 at 16:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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