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

Notepad++ Visual Prolog Language Support

Unread post 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
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Unread post 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
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

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: 83
Joined: 6 Mar 2000 0:01

Unread post by Jan de Lint »

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: 1398
Joined: 28 Feb 2000 0:01

Unread post 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++.
Regards Thomas Linder Puls
PDC
User avatar
Jan de Lint
VIP Member
Posts: 83
Joined: 6 Mar 2000 0:01

Unread post by Jan de Lint »

After reinstall it works. But now the plugin 'plugin manager' is lost.
]an
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

That unfortunately is outside my experience area.
Regards Thomas Linder Puls
PDC
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Unread post 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.
User avatar
drspro2
VIP Member
Posts: 97
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Unread post 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.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Unread post by Thomas Linder Puls »

How did you change the color-theme?
Regards Thomas Linder Puls
PDC
User avatar
drspro2
VIP Member
Posts: 97
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Unread post 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
User avatar
drspro2
VIP Member
Posts: 97
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Unread post by drspro2 »

atomedit.jpg
atomedit.jpg (140.41 KiB) Viewed 33592 times
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Unread post 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.
Regards Thomas Linder Puls
PDC
User avatar
drspro2
VIP Member
Posts: 97
Joined: 28 Apr 2006 12:03

Re: Notepad++ Visual Prolog Language Support

Unread post 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
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: Notepad++ Visual Prolog Language Support

Unread post by Thomas Linder Puls »

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