5

NP++ 6.8.5 (latest)

I added a language to Notepad using the 'Define Your Language', 'Import' function. This works great. However, I have to explicitly indicate the language type every time I open a file. The XML that I imported defined the three extensions that my language uses, but it's not recognizing them.

I tried associating the extensions in the Style Configurator dialog, as suggested in multiple similar questions here on SU, but my user-defined language does not appear in the list of available languages in the list box.

Is there some other file or function that I can use to achieve this?

My previous version of NP++ didn't have this problem, syntax highlighting always worked until I upgraded.

2

My user-defined language does not appear in the list of available languages in the list box.

User defined languages are automatically added to the "Language" menu.

  • They appear after the horizontal separator in the menu.

  • You have to restart Notepad++ after installing the new language.

    enter image description here

  • "Apache" and "Progress" are User Defined languages.

  • If you open files with the correct extension, eg .i they will have the lang auto selected to "Progress" and will be styled as appropriate.

User defined languages do not appear in the "Language Menu" list box.

  • Only built-in languages appear there.

    Menu "Settings" > "Preferences" > "Language Menu" tab:

    enter image description here

User defined languages do not appear in the "Style Configurator" dialog.

  • Only built-in languages appear there.

    Menu "Setting" > "Style Configurator":

    enter image description here

There are some Notepad++ patches for installing User Defined languages.

  • These patches are more than just XML language definitions.

  • An example is Progress 4gl / ABL "adds support for Progress 4gl / ABL: Syntax highlighting, block folding and auto completion"

| improve this answer | |
  • Thank you for your reply. My 'Preferences' looks identical to your screen shot, but, there is no ability to add anything in the 'Available Items' column, and it doesn't show my user-defined language in there, and I don't see any place that lets you add entries... – GregT Oct 28 '15 at 0:03
  • Can you share your language XML? – DavidPostill Oct 28 '15 at 0:06
  • <NotepadPlus> <UserLang name="Progress" ext="p w i"> <Settings> <Global caseIgnored="yes" /> <TreatAsSymbol comment="yes" commentLine="no" /> <Prefix words1="no" words2="no" words3="no" words4="no" /> </Settings> <KeywordLists> <Keywords ...> </KeywordLists> <Styles> <WordsStyle ...> </Styles> </UserLang> </NotepadPlus> – GregT Oct 28 '15 at 0:12
  • I got this from the NP++ site though it was a while ago. Obviously I removed the verbose bits, I doubt they are relevant. – GregT Oct 28 '15 at 0:13
  • If you restart npp it will be in the language menu. If you open files with the correct extension, eg .i they will have the lang auto selected to Progress and will be styled. Only built-in languages appear in the configurator. – DavidPostill Oct 28 '15 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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