Menu

How to associate a new file type with a lang

2007-09-06
2012-11-13
  • Nobody/Anonymous

    How can I associate a new file type to always be treated like it's a certain language.

    Example: I am programming in a custom build of C. The file types for this are .mc. But, for all purposes, the language is C. So I want it so that when I open up the .mc file, it will automatically associate it as in the programming language C (so that I don't have to go and select C under the language menu for each file...there's alot of them).

    Thanks!

    -James

     
    • Nobody/Anonymous

      *bump*

       
      • Nobody/Anonymous

        Open langs.xml in Notepad++ installation directory. (eg: C:\Program Files\Notepad++)
        In the document search for <Language name="c"
        Add mc to ext attribute eg: <Language name="c" ext="c mc"
        Save the file.
        Next time a .mc file will be opened as c file.

        <Language name="c" ext="c mc" commentLine="//" commentStart="/*" commentEnd="*/">

        Thanks/Sai

         
        • Don HO

          Don HO - 2007-09-07

          Or just use the Styler Configurator.

          Don

           
        • Idris Samawi Hamid

          Why so complicated? Just go to

          Settings > Style Configurator > Language > Perl

          and add your extension under

          User ext:

          That's it!

           
          • Nobody/Anonymous

            Thank you so much! :)

            -James