Notepad++ Visual Prolog Language Support

Discussions related to Visual Prolog
User avatar
Jan de Lint
VIP Member
Posts: 235
Joined: 6 Mar 2000 0:01

Notepad++ Visual Prolog Language Support

Post by Jan de Lint » 3 Sep 2017 14:32

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

Harrison Pratt
VIP Member
Posts: 275
Joined: 5 Nov 2000 0:01

Post by Harrison Pratt » 3 Sep 2017 15:53

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

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 3 Sep 2017 18:44

It works fine for me. Also after uninstalling (where I answered yes to delete my settings) and installing again.
Regards Thomas Linder Puls
PDC

User avatar
Jan de Lint
VIP Member
Posts: 235
Joined: 6 Mar 2000 0:01

Post by Jan de Lint » 4 Sep 2017 8:07

Tried both VIP 5.1 and VIP 7.5 files.
Doesn't work for me either. Will try reinstall.
]an

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 4 Sep 2017 8:25

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++.
Regards Thomas Linder Puls
PDC

User avatar
Jan de Lint
VIP Member
Posts: 235
Joined: 6 Mar 2000 0:01

Post by Jan de Lint » 4 Sep 2017 9:34

After reinstall it works. But now the plugin 'plugin manager' is lost.
]an

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 4 Sep 2017 10:04

That unfortunately is outside my experience area.
Regards Thomas Linder Puls
PDC

Harrison Pratt
VIP Member
Posts: 275
Joined: 5 Nov 2000 0:01

Post by Harrison Pratt » 4 Sep 2017 12:52

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.

drspro2
Active Member
Posts: 118
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Post by drspro2 » 9 Oct 2018 4:23

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.

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Post by Thomas Linder Puls » 9 Oct 2018 14:20

How did you change the color-theme?
Regards Thomas Linder Puls
PDC

drspro2
Active Member
Posts: 118
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Post by drspro2 » 10 Oct 2018 5:44

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

drspro2
Active Member
Posts: 118
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Post by drspro2 » 10 Oct 2018 5:46

atomedit.jpg
atomedit.jpg (140.41 KiB) Viewed 1178 times

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Post by Thomas Linder Puls » 10 Oct 2018 8:04

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.
Regards Thomas Linder Puls
PDC

drspro2
Active Member
Posts: 118
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Post by drspro2 » 11 Oct 2018 7:30

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

User avatar
Thomas Linder Puls
VIP Member
Posts: 2350
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Post by Thomas Linder Puls » 12 Oct 2018 8:33

I believe it is in C:\Users\<user>\AppData\Roaming\Notepad++\stylers.xml
Regards Thomas Linder Puls
PDC

Post Reply