Page 1 of 2

Notepad++ Visual Prolog Language Support

Posted: 3 Sep 2017 14:32
by Jan de Lint
I noticed that the latest version of Notepad++ 7.5.1 announces Visual Prolog language support.
That would be of course a good thing!
Can anybody comment on that?
Thanks,
]an

Posted: 3 Sep 2017 15:53
by Harrison Pratt
There does not seem to be anything special in NPP's built-in Visual Prolog support -- opening a .PRO file in NPP 7.5.1 shows plain black on white text with no syntax highlighting. I'll take a deeper look later. I just installed the NPP upgrade this morning after seeing your post.

I have been using my own user-defined languages for VP in NPP for some time, from VIP 3.2 days until now, and like it very much. The custom syntax highlighting and macros are very helpful.

-- Addendum --

The language does seem to be defined in the langs.model.xml and styles.model.xml files in the Notepad++ executable directory, so I don't know what's going on with the VIP 7.5 lexer. The lexers for the other languages work as expected on my .PRO file.

In Settings > Preferences... > Language Visual Prolog is Available in the Language Menu section of the dialog.

I don't know how to fix that problem right now -- will try to get help here:
https://github.com/notepad-plus-plus/no ... /pull/1439

Posted: 3 Sep 2017 18:44
by Thomas Linder Puls
It works fine for me. Also after uninstalling (where I answered yes to delete my settings) and installing again.

Posted: 4 Sep 2017 8:07
by Jan de Lint
Tried both VIP 5.1 and VIP 7.5 files.
Doesn't work for me either. Will try reinstall.
]an

Posted: 4 Sep 2017 8:25
by Thomas Linder Puls
Apparently, Notepad++ cannot merge old settings with the new ones and therefor it simply retain the old settings.

The settings are in C:\Users\<user>\AppData\Roaming\Notepad++ the relevant files are langs.xml and styles.xml.

If you delete (or rename) the files you will get fresh copies next time you start Notepad++.

Posted: 4 Sep 2017 9:34
by Jan de Lint
After reinstall it works. But now the plugin 'plugin manager' is lost.
]an

Posted: 4 Sep 2017 10:04
by Thomas Linder Puls
That unfortunately is outside my experience area.

Posted: 4 Sep 2017 12:52
by Harrison Pratt
Plugin Manager is missing (for now) from NPP 7.5. A replacement is promised. Apparently you can manually install it from a previous version, but I haven't tried doing that yet. https://github.com/notepad-plus-plus/no ... ssues/2430

Here is how I got the new built-in Visual Prolog lexer to work in NPP while keeping my own lexers and macros:

(1) Make a backup copy of my NPP installation directories: Program Files (x86) and C:\Users\<USERNAMEHERE>\AppData\Roaming\Notepad++.
(2) Completely uninstall the current version of NPP.
(3) Copy backup copy of userDefinedLang.xlm into the corresponding new directory.
(4) Use an XML editor to merge the the backup copy of shortcuts.xml with the new file. I used CodeCompare. You might be able to just copy this file from backup, but I didn't try that.

I think that Plugin Manager is preserved if you do an in-place up-grade of NPP, but is lost on uninstall/reinstall.

I copied PluginManager.dll from backup into the plugins directory in the Roaming tree, then ran GUP.exe from the Notepad++/updater directory to install the PM and upgrade it.

Re: Notepad++ Visual Prolog Language Support

Posted: 9 Oct 2018 4:23
by drspro2
I have been using the notepad-plus-plus editor, it worked very good, until now when I changed the color-theme, ( i wanted to have grey as a background) it loses the Visual-prolog syntax coloring. I am trying to find how to get the syntax coloring back.

Re: Notepad++ Visual Prolog Language Support

Posted: 9 Oct 2018 14:20
by Thomas Linder Puls
How did you change the color-theme?

Re: Notepad++ Visual Prolog Language Support

Posted: 10 Oct 2018 5:44
by drspro2
hi, in notepad plus plus through: item Settings - and then the second item underneath it, in Dutch: 'Opmaak' (Layout I think )

then there are several color themes, my idea is to have a grey background which could be easier to read compared to white background,

the Atom editor also has support for Prolog, i attach here a screen shot from the atom editor with a prolog file

Re: Notepad++ Visual Prolog Language Support

Posted: 10 Oct 2018 5:46
by drspro2
atomedit.jpg
atomedit.jpg (140.41 KiB) Viewed 7016 times

Re: Notepad++ Visual Prolog Language Support

Posted: 10 Oct 2018 8:04
by Thomas Linder Puls
OK (Settings -> Style Configurator… -> Select theme). The themes you select among are each described in an xml file. My guess it that many of these xml files lack entries for Visual Prolog (and probably also for a lot of other languages). So to get Visual Prolog support io another theme you must somehow get entries Visual Prolog settings into the file.

Re: Notepad++ Visual Prolog Language Support

Posted: 11 Oct 2018 7:30
by drspro2
there is a themes folder which contains xml files, but there is no default theme xml file which was used before the change and what would contain the syntax configuration for the visual-prolog token coloring, so the syntax coloring scheme is stored elsewhere is my assumption at this moment

Re: Notepad++ Visual Prolog Language Support

Posted: 12 Oct 2018 8:33
by Thomas Linder Puls
I believe it is in C:\Users\<user>\AppData\Roaming\Notepad++\stylers.xml