Notepad++ opens ActionScript file with Haskell syntax highlighting

Sometimes I open ActionScript files in another editor then FlashDevelop. And in my case this is Notepad++.
Notepad++ has ActionScript syntax highlighting but it seems that it doesn’t detect it.
When I open an AS file it uses the Haskell syntax highlighting, and that is very annoying especially when you open a couple of files and you need to set them one by one to ActionScript.

Google (who else) provided the answer: here.

This is what you do:
find and open the langs.xml file
you can find it in the install folder of Notepad++, in my case
C:\Program Files\Notepad++

find the haskell language
< Language name="haskell" ext="hs lhs as las" commentLine="--" >

and remove “as” from the ext and save the file.

Next time you open an AS file with notepad++ it will be highlighted in the correct syntax


    14 thoughts on “Notepad++ opens ActionScript file with Haskell syntax highlighting

    1. Thanks for the advice! I was wondering why it wouldn’t hightlight correctly… the haskell/actionscript shared file extension is something I probably would not have caught nor known how to fix 🙂

    2. I found in the langs.xml file that the first entry has no closing

      Actionscript being the second language, I believe this might be the root problem

    3. I also had to delete the langs.xml cache file located here for it to work:

    4. To make it work under my win7 I had to delete the langs.model.xml from:

    Comments are closed.