Friday, April 11, 2014

Re: Trailing spaces in comments after gq inside php-files

On Thursday, July 30, 2009 4:04:22 AM UTC-3, Jerri wrote:
>
> One thing nonetheless bothers me. Without filetype plugins and indent,
> if I reformat a commentblock (#) inside my php-code (e.g. by marking the
> comment and pressing gq) everything works all right.
>
> Unfortunately using the plugins and indents If I write a long comment on
> a line and then reformat the line I get trailing spaces in the comment.
> Right now I have to remove them by hand.

Inside /usr/share/vim/vim74/indent/php.vim there is the following line:

setlocal formatoptions+=w

It adds a space character at the end of lines. (see :help fo-table)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: