Menu ▾ ▴

how to modify New File behaviour

Veenone
2009-07-19
2012-11-13
  • Veenone

    Veenone - 2009-07-19

    Hi all,
    It's been a while I'm using Notepad++ and so far I have no complaints on it.
    I have a question here, can someone show me how to define a custom file type automatically when creating new file?

    The thing is like this, I use Notepad++ as my default editor for custom file type (*.pcom). I've created the custom styling and autocomplete library for this type of file. One thing I still don't know is how to make Notepad++ set the language of newly created through New file menu to .pcom that I've already defined? I thought that by doing this, I don't have to set the document language everytime I created new file.

    thank you

     
    • cchris

      cchris - 2009-07-19

      Settings -> Preference -> New Document - Open Save Directory, use the drop down to choose Default Language. This only changes the highlighter being initially used, the file is still named "new 2". Ask for the fictionality extension in IdeaTorrent - SF will fix the voting system one day or another -.

      CChris

       
    • Veenone

      Veenone - 2009-07-19

      I see, I guess I missed that section :p
      Anyway thanks a lot for the info!

      Cheers

       
      • Veenone

        Veenone - 2009-07-21

        Hi Chris it's me again,

        I've tried your guide, but the thing is that my user defined custom language isn't listed within the combo box. is there any way to register my custom language into the language list in there?

        Thanks

         
    • cchris

      cchris - 2009-07-22

      Ah. Then you must do it from the User Define Language (UDL) panel.

      In the upper right corner of that panel, when you select your language, there is an "extension" text field to enter extensions without leading dot. Multiple extensions are separated by spaces. Save, close NP++ and reopen.

      CChris