tags:

views:

26

answers:

1

Hello,

I designed my own User defined language in notepad++. To really get use out of that, it would be very nice, to assign it to a specific file ending? Does any one know how to do that? Thanks for Help

eactor

+1  A: 

By "assign it to a specific file ending," I'm guessing that you mean you want to associate your new file type with a specific program? If so:

  • Create a file of that type and save it with the desired file extension, say .foo.
  • Open the file in Windows Explorer and it should show a dialog saying something like "Windows cannot open this file ... Windows needs to know what program you want to use to open it."
  • Select the program that you would like to use to open it, and make sure to check the "Always use the selected program to open this kind of file" checkbox.
  • Profit!

Edit:

Associating file extensions with highlighters (from the Notepad++ Wiki):

For User Defined Languages, the extension list is given in the ext attribute of the userLang node which describes the language. The list appears between double quotes, is space separated, and extensions shouldn't have any leading period. It is shown on the upper left corner of the User Define Dialog, and is better edited there.

Matt Ball
Thanks for the fast answer, but thing what i want to do is: If i have my file ending .foo it is assigned to notepad++. It allows diffrent style sheets and word highlighting, so if you open a C++ file the words of c are highlighted. Now i have designed my own style sheet, but it only assigns it if I select it manually.
eactor
@eactor: see my edit.
Matt Ball
Thanks a lot,the part with the leading period, was the problem for me.
eactor