For Programmers: Free Programming Magazines  


Home > Archive > Prolog > May 2007 > [new] How to make SWI-Prolog use the 'gvim' editor on Windows 2000









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [new] How to make SWI-Prolog use the 'gvim' editor on Windows 2000
anyone

2007-05-01, 7:05 pm


How to make SWI-Prolog use the 'gvim' editor on Windows 2000
------------------------------------------------------------

The issues:

(1) Make sure that SWI-Prolog knows that you want it to use 'gvim' to
do your editing.

Launch SWI-Prolog and click

Settings -> User init file ...

This should bring up either the current 'pl.ini' (if you have one)
or the system-supplied default 'pl.ini' (if you don't have one) in the
built-in Xpce editor buffer. If that doesn't happen, you can always exit
SWI-Prolog and edit your 'pl.ini' with Notepad or some other text-editor.

One way or the other, get the command

:- set_prolog_flag(editor,gvim).

into your 'pl.ini' file and make sure it is the only such non-commented
'set_prolog_flag(editor, _ )' command in the file; that done, save the
new text and exit the editor.


(2) Make sure that SWI-Prolog knows where to find 'gvim.exe'.

Click on

Start->Settings->Control Panel->System->Advanced tab->Environmental
Variables

Look in the lower list, labeled 'System Variables', highlight the
variable named 'Path', and click on the button labeled 'Edit...'.

On my system, the directory that contains 'gvim.exe' is

J:\Program Files\vim\vim70

If necessary, use Start|Search to locate the directory in which
'gvim.exe' resides and make sure it is represented on your System Path;
if it isn't there, put it there -- and make sure it is preceded and
followed by a semicolon, as in

... ;J:\Program Files\vim\vim70\; ...

That done, "Ok" your way back out and exit System Properties.


(3) Check your work.

Restart SWI-Prolog and try

?- current_prolog_flag(editor,Q).

It should reply

Q = gvim

and, assuming that a file named

'your_current_prolog_masterpiece.pl'

exists in the directory in which SWI-Prolog started

?- edit(your_current_prolog_masterpiece).

should bring up the file 'your_current_prolog_masterpiece.pl' in the
'gvim' editor.

If it doesn't, revisit Issue (1), above.

Ref. http://gollem.science.uva.nl/SWI-Pr...al/listing.html


Note:

If like me you prefer to be able to launch SWI-Prolog by typing
"plwin" at the MS-DOS console prompt from within the directory that
contains the files you are working on, just add the path to the
directory that contains 'plwin.exe' to your System Path as per
Issue (2), above.

--
billh [04/30/07]











Tomislav

2007-05-07, 6:02 am

Johnny Depp lesbian strip!
http://Johnny-Depp-lesbian-strip.or...hp?movie=148803
Mountain

2007-05-14, 8:08 pm

superb!
http://freemovieshost.com/ftp/Play?id=1673286.mpeg
Dertenjoterad49

2007-05-31, 1:34 pm

http://Katie-Holmes-touching-her-bo...p?movie=1673286
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com