I'm having trouble configuring Vim on Manjaro:
After setting syntax on
at .vimrc
file, I make a Prolog program (bug.pl
) which shows no syntax highlight:
But after I append /**/
to top of file (then quit and restart vim), highlighting somehow works:
(/**/
is comment in Prolog, same like that of C)
So how do I have highlight without that useless /**/
?
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=17.0.1
DISTRIB_CODENAME=Gellivara
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 6 2017 14:13:23)
Update:
Suggested by grodzik, it's about filetype conflict.
I fix it by adding au FileType perl set filetype=prolog
to my .vimrc
. (Make sure it's AFTER syntax on
)
Now I see highlight.