'comments' option not working..

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

'comments' option not working..

Andrei Kulakov

Hi, I have a bit of an issue with 'comments' in python files, in
Vim7.3.. My settings are: fo="cqn", tw=98, comments=''. If I do :set
comments="b:#" and then do :set comments to check, 'comments' shows up
as empty. I don't have any autocommand for python files that would
change comments option. I do have +comments compiled into Vim.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: 'comments' option not working..

Nikolay Aleksandrovich Pavlov
Reply to message «'comments' option not working..»,
sent 18:47:25 07 November 2010, Sunday
by AK:

Of course it is not working, if you do
    set comments="b:#"
. Vim will parse it like that
    set comments=
because everything starting with `"' is a comment. You should either use
    let &l:comments="b:#"
or
    setlocal comments=b:#
. And note not to use `set' when you set local option, use `setlocal'.

Original message:
> Hi, I have a bit of an issue with 'comments' in python files, in
> Vim7.3.. My settings are: fo="cqn", tw=98, comments=''. If I do :set
> comments="b:#" and then do :set comments to check, 'comments' shows up
> as empty. I don't have any autocommand for python files that would
> change comments option. I do have +comments compiled into Vim.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 'comments' option not working..

Andrei Kulakov
On 11/07/2010 10:51 AM, ZyX wrote:

> Reply to message «'comments' option not working..»,
> sent 18:47:25 07 November 2010, Sunday
> by AK:
>
> Of course it is not working, if you do
>      set comments="b:#"
> . Vim will parse it like that
>      set comments=
> because everything starting with `"' is a comment. You should either use
>      let&l:comments="b:#"
> or
>      setlocal comments=b:#
> . And note not to use `set' when you set local option, use `setlocal'.

Thanks! This is the second time this one bites me, At first I did
:set comments=#, which gave me an error "zero length string", I thought
this meant it has to be enclosed in quotes. -ak

--
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