New config file structure (Discussion)

An idea to help new users transitioning, is to print a message like this when swipl starts:

The ~/.swiplrc file should now be in ~/.config/swi-prolog/, do
 you want me to move it there (m),  copyt it (c),  make a symbolic
 link (l), or to simply leave it alone (a) ? Please answer m/l/c/a: 

Note that NTFS supports symbolic links also.

This messgae would be printed only once, if ~/.config/swi-prolog/ is not found, but ~/.swiplrc is found.

That makes sense as a temporary work around. I think I’ll opt for merely a warning though.

Wasn’t that only between directories? At least, that is in my memory.

I think only for files, not directories.

HTTP tutorial 1 mentions the use of edit for jumping to the definitions of predicates, modules, files, etc. using the editor of the user’s choice. But finding a way to customize the editor used by edit/1 in SWI-Prolog was a bit frustrating with search engines showing links to outdated talks or docs 2 (still .plrc). So, here I am sprinkling some key phrases and, I hope, saving someone the trouble.

To choose the editor used by edit in SWI-Prolog (and make the setting global and permanent) include the following line in your config $HOME/.swiplrc (for older versions, e.g. the one available from the Debian repos) or $HOME/.config/swi-prolog/ (latest versions):

:- set_prolog_flag(editor, nvim).

(Use editor of your choice instead of “nvim”: full path on Windows or a binary name on GNU/Linux).

1 Like

Thanks. Updated the FAQ entry. Should be online in an hour.