Closed char101 closed 11 years ago
Vim has a built-in comment formatting system, this patch should not be required. The indent script enables this system automatically unless PHP_autoformatcomment is set to 0
Type :help php-indent and read the details about the PHP_autoformatcomment option
Another script might be interfering check the value of ":set comments" (it should be: "s1:/,mb:,ex:*/,://,:#") and ":set formatoptions" should return the following flags: qrowcb
Here are the values of the settings you mentioned
echo b:PHP_autoformatcomment
1
set comments?
comments=s1:/,mb:,ex:*/,://,:#
setlocal formatoptions?
formatoptions=qrowcb
As you can see the values are as you wrote it should be. But without adding the \?, the comments are still indented incorrectly.
After I test it again now, it works fine without the change. Could be a vim patch bug since I have just recompiled vim.
Thanks.
Before:
After: