formatlistpat bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

formatlistpat bug?

Bee-16
Mac terminal vim version 7.2.444
Linux terminal version 7.2.330

:set formatlistpat
returns:
formatlistpat=^\s*\d\+[\]:.)}\t ]\s*

Doing the following results in an error

:set formatlistpat=^\s*\d\+[\]:.)}\t ]\s*

E518: Unknown option: ]\s*

I know this is the default...
When I tried to customize I got the error and started with the
default.

This is what is needed to re-create the default.

:set formatlistpat=^\\s*\\d\+[\\]:.)}\\t\ ]\\s*

Is this a bug?
--or--
What kind of magic?

-Bill

--
You received this message from the "vim_dev" 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
|  
Report Content as Inappropriate

Re: formatlistpat bug?

Benjamin R. Haskell-8
On Sun, 11 Jul 2010, Bee wrote:

> Mac terminal vim version 7.2.444
> Linux terminal version 7.2.330
>
> :set formatlistpat
> returns:
> formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>
> Doing the following results in an error
>
> :set formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>
> E518: Unknown option: ]\s*
>
> I know this is the default...
> When I tried to customize I got the error and started with the
> default.
>
> This is what is needed to re-create the default.
>
> :set formatlistpat=^\\s*\\d\+[\\]:.)}\\t\ ]\\s*
>
> Is this a bug?
> --or--
> What kind of magic?

This kind of magic :-)

:help option-backslash

Gist: backslashes and spaces are special in option value commands.

The :set command doesn't attempt to 'escape' its output when you request
the value back.

--
Best,
Ben

--
You received this message from the "vim_dev" 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
|  
Report Content as Inappropriate

Re: formatlistpat bug?

Bee-16
On Jul 11, 9:33 pm, "Benjamin R. Haskell" <[hidden email]> wrote:

> On Sun, 11 Jul 2010, Bee wrote:
> > Mac terminal vim version 7.2.444
> > Linux terminal version 7.2.330
>
> > :set formatlistpat
> > returns:
> > formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>
> > Doing the following results in an error
>
> > :set formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>
> > E518: Unknown option: ]\s*
>
> > I know this is the default...
> > When I tried to customize I got the error and started with the
> > default.
>
> > This is what is needed to re-create the default.
>
> > :set formatlistpat=^\\s*\\d\+[\\]:.)}\\t\ ]\\s*
>
> > Is this a bug?
> > --or--
> > What kind of magic?
>
> This kind of magic :-)
>
> :help option-backslash
>
> Gist: backslashes and spaces are special in option value commands.
>
> The :set command doesn't attempt to 'escape' its output when you request
> the value back.

Ah oh !>) THAT kind of magic.

Thank you for the reference.
I guess I have never used :set with a space or \

--
You received this message from the "vim_dev" 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
|  
Report Content as Inappropriate

Re: formatlistpat bug?

Tony Mechelynck
On 12/07/10 06:45, Bee wrote:

> On Jul 11, 9:33 pm, "Benjamin R. Haskell"<[hidden email]>  wrote:
>> On Sun, 11 Jul 2010, Bee wrote:
>>> Mac terminal vim version 7.2.444
>>> Linux terminal version 7.2.330
>>
>>> :set formatlistpat
>>> returns:
>>> formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>>
>>> Doing the following results in an error
>>
>>> :set formatlistpat=^\s*\d\+[\]:.)}\t ]\s*
>>
>>> E518: Unknown option: ]\s*
>>
>>> I know this is the default...
>>> When I tried to customize I got the error and started with the
>>> default.
>>
>>> This is what is needed to re-create the default.
>>
>>> :set formatlistpat=^\\s*\\d\+[\\]:.)}\\t\ ]\\s*
>>
>>> Is this a bug?
>>> --or--
>>> What kind of magic?
>>
>> This kind of magic :-)
>>
>> :help option-backslash
>>
>> Gist: backslashes and spaces are special in option value commands.
>>
>> The :set command doesn't attempt to 'escape' its output when you request
>> the value back.
>
> Ah oh !>) THAT kind of magic.
>
> Thank you for the reference.
> I guess I have never used :set with a space or \
>

To see the present value with the backslashes added, use

        :setlocal flp=<Tab>

instead. Then you can edit the value on the command-line if you want.


Best regards,
Tony.
--
"... And remember: if you don't like the news, go out and make some of
your own."
          -- "Scoop" Nisker, KFOG radio reporter
                   Preposterous Words

--
You received this message from the "vim_dev" 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
Loading...