2
votes

I'm having a problem with changing a directory in which I store *.pl files. The default one is located in my home folder. I can change working directory, either by using working_directory predicate or cd command in swipl interpreter. The thing is I have to do it every single time I run SWI Prolog, so I'm looking for a permanent solution. I tried to include those two solutions in .plrc file, which I created in my home directory but it didn't help.

I am a Mac OS X user, if that would be of any help.

Also, can you recommend any text editors for Prolog with multi-tabs support?

1
there are varous ways to load prolog files. Also with absolute path. have a look at apropos(load). and the surrounding predicates. I use Notepad++ with Haskell syntax highlighing. - User

1 Answers

3
votes

SWI-Prolog supports a per-user initialization file which, on POSIX systems such as MacOS X, is named .plrc. Simply create this file (if it doesn't exist already) on your home directory and add to it the line:

:- initialization(cd).

Regarding text editors with multi-tab and syntax coloring support for Prolog, try e.g. TextMate 2 (with the Prolog or the Logtalk bundles installed).