Prolog support for Vim users

Sourabh Daptardar picture Sourabh Daptardar · Oct 26, 2013 · Viewed 9.8k times · Source

I am starting with Prolog programming using XSB.

What syntax highlighting script or plugin for vim editor would you suggest for (XSB) Prolog ?

Answer

Ingo Karkat picture Ingo Karkat · Oct 26, 2013

Vim (7.3) comes with filetype-specific settings and syntax highlighting for Prolog. Just make sure that your file is detected as such (i.e. :setlocal filetype? prints prolog), and you have the usual :filetype plugin on and :syntax on in your ~/.vimrc.

Vim auto-detects *.pdb and *.pl (depending on contents, can also be Perl); but you can configure additional patterns, see :help new-filetype.