tags:

views:

47

answers:

2

My vim used to auto-continue comments in php. For example:

/* |  <- cursor here

Then, pressing Enter gives me:

/*
 * |  <- cursor here

and again, gives me:

/*
 *
 * |  <- cursor here

etc...

As far as I understand it, this is controlled by the comments and formatoptions options. However, whenever I open a php file now, comments is set to:

s:<!--,m: ,e:-->

I've looked all over my ~/.vim folder, as well as the $VIMRUNTIME folder, and I can't find out where/why this changed, and why the comments option is being set incorrectly.

Here's a link to my .vimrc

http://pastebin.com/f1509ce65

A: 

The php.vim file should be in your ftplugin folder in $VIMRUNTIME.

In version 7.2 of vim, the comments line is line 74 in that file.

Did that file get deleted or moved?

John Weldon
No, it's still there.Maintainer: Dan SharpURL: http://dwsharp.users.sourceforge.net/vim/ftplugin
Bryan Ross
do you have any files in your personal .vim/ftplugin that could be overriding the comments? Or your .vim/filetype.vim for that matter?
John Weldon
Found it. see answer
Bryan Ross
+1  A: 

Found it. I had a funky .vim/indent/php.vim file that somehow was screwing it up.

Deleted it, and the functionality I was looking for returned. Thanks tho!

Bryan Ross