set all - each option one line

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

set all - each option one line

Erhy
Hello!
I want to compare the options set in VIM.

Do you know, how to format of set all output
that I have for each option a separate line ?

Thank you for tips
Erhy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/af26d5c8-f6e7-4cea-88e2-93ffed4c9c2c%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Andy Wokula
Am 15.01.2020 um 22:22 schrieb Erhy:
> Hello!
> I want to compare the options set in VIM.
>
> Do you know, how to format of set all output
> that I have *for each option a separate line *?
>
> Thank you for tips
> Erhy

Apparently
     :set
always (?) produces multi-column output.
(sounds like one of those little annoyances that others didn't bother to ask for years)

You could redirect to a buffer with very small temporary 'columns' setting (at least 12),
but that's awful.

Or :substitute the (redirected) multi-column output to get single column output:

     :%s/ \+\ze\%(no\l\+\%(\s\|$\)\|  \S\)/\r/gIe

Obviously the problem is how to not split within option values.
My example output (not given here) shows a statusline with spaces and these don't appear escaped, so one just
cannot skip escaped spaces -- just make it a bit more unlikely to split there.

--
Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5E20CC93.1090505%40yahoo.de.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Bram Moolenaar

Andy Wokula wrote:

> Am 15.01.2020 um 22:22 schrieb Erhy:
> > Hello!
> > I want to compare the options set in VIM.
> >
> > Do you know, how to format of set all output
> > that I have *for each option a separate line *?
> >
> > Thank you for tips
> > Erhy
>
> Apparently
>      :set
> always (?) produces multi-column output.
> (sounds like one of those little annoyances that others didn't bother
> to ask for years)

How about ":set!" only using one column?  Currently ! isn't used and I
can't think of anything we would want to use it for when listing
options.
 

> You could redirect to a buffer with very small temporary 'columns'
> setting (at least 12), but that's awful.
>
> Or :substitute the (redirected) multi-column output to get single column output:
>
>      :%s/ \+\ze\%(no\l\+\%(\s\|$\)\|  \S\)/\r/gIe
>
> Obviously the problem is how to not split within option values.
> My example output (not given here) shows a statusline with spaces and
> these don't appear escaped, so one just cannot skip escaped spaces --
> just make it a bit more unlikely to split there.

--
SECOND SOLDIER: It could be carried by an African swallow!
FIRST SOLDIER:  Oh  yes! An African swallow maybe ... but not a European
                swallow. that's my point.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202001171839.00HIdRQO010196%40masaka.moolenaar.net.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Andy Wokula
Am 17.01.2020 um 19:39 schrieb Bram Moolenaar:

> Andy Wokula wrote:
>
>> Am 15.01.2020 um 22:22 schrieb Erhy:
>>> Hello!
>>> I want to compare the options set in VIM.
>>>
>>> Do you know, how to format of set all output
>>> that I have *for each option a separate line *?
>>>
>>> Thank you for tips
>>> Erhy
>>
>> Apparently
>>       :set
>> always (?) produces multi-column output.
>> (sounds like one of those little annoyances that others didn't bother
>> to ask for years)
>
> How about ":set!" only using one column?  Currently ! isn't used and I
> can't think of anything we would want to use it for when listing
> options.

Why not.
Simple solution for a simple problem ^^.

--
Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5E2210A9.3040308%40yahoo.de.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Erhy
don't see the simple solution?
please tell me
Erhy

Am Freitag, 17. Januar 2020 20:53:25 UTC+1 schrieb Andy Wokula:
Am 17.01.2020 um 19:39 schrieb Bram Moolenaar:

> Andy Wokula wrote:
>
>> Am 15.01.2020 um 22:22 schrieb Erhy:
>>> Hello!
>>> I want to compare the options set in VIM.
>>>
>>> Do you know, how to format of set all output
>>> that I have *for each option a separate line *?
>>>
>>> Thank you for tips
>>> Erhy
>>
>> Apparently
>>       :set
>> always (?) produces multi-column output.
>> (sounds like one of those little annoyances that others didn't bother
>> to ask for years)
>
> How about ":set!" only using one column?  Currently ! isn't used and I
> can't think of anything we would want to use it for when listing
> options.

Why not.
Simple solution for a simple problem ^^.

--
Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7e32905b-6a9e-48eb-8ac5-659127d8e50f%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Andy Wokula
Am 17.01.2020 um 22:48 schrieb Erhy:
> don't see the simple solution?
> please tell me
> Erhy

Get Vim 8.2.0128 and then use
     :set!

--
Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5E2320D7.5090406%40yahoo.de.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

John Little-4
In reply to this post by Erhy
If you can't build or obtain a very new vim version, using the python interface can serve with a bit of work.  Use the :ver command to see what

For example, my vim is compiled with python3, so in a scratch buffer
py3 << eof
b = vim.current.buffer
for k in vim.options:
    b.append(k + '=' + str(vim.options[k]))
eof

That's global options only, there's buffer-local and window-local options too.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/799ff61b-0fc4-474c-a50f-c755135bfafb%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: set all - each option one line

Erhy
In reply to this post by Andy Wokula
how I can get  Vim 8.2.0128
Few days before I have installed Vim
and gvim.exe has the version 8.2.0.0 
... with this :set! doesn't work

Erhy


Am Samstag, 18. Januar 2020 16:14:46 UTC+1 schrieb Andy Wokula:
Am 17.01.2020 um 22:48 schrieb Erhy:
> don't see the simple solution?
> please tell me
> Erhy

Get Vim 8.2.0128 and then use
     :set!

--
Andy

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0693d794-cc09-4484-b6e3-ab42261d4d68%40googlegroups.com.