any way to format vim --version?

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

any way to format vim --version?

tooth pik
inside vim :ver has been beautified to list features in as many columns as will
fit the window, but out at the bash prompt vim --version seems limited to four
columns of features, causing the display to scroll off the top of my screen if i
let --version print all of the Compilation and Linking lines

i have attempted to make those last two lines readable with

vim --version | awk '!/^Compilation/ && !/Linking/'
vim --version | grep '^Compilation' | fmt -w $(( $(tput cols) - 2 ))
vim --version | grep '^Linking' | fmt -w $(( $(tput cols) - 2 ))

if i want it to fit do i need to write a script to capture the
--version output and
perform some parsing and tabling magic or is there an option to tell vim to
query the system with maybe a call to tput cols

--
--
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/CALfSX1zuxMdDBVShVRXo26wePC9dbBofyGwcux4O1SxWdBTPsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: any way to format vim --version?

Danek Duvall-2
On Fri, Jun 14, 2019 at 06:29:46PM -0500, tooth pik wrote:

> inside vim :ver has been beautified to list features in as many columns as will
> fit the window, but out at the bash prompt vim --version seems limited to four
> columns of features, causing the display to scroll off the top of my screen if i
> let --version print all of the Compilation and Linking lines
>
> i have attempted to make those last two lines readable with
>
> vim --version | awk '!/^Compilation/ && !/Linking/'
> vim --version | grep '^Compilation' | fmt -w $(( $(tput cols) - 2 ))
> vim --version | grep '^Linking' | fmt -w $(( $(tput cols) - 2 ))
>
> if i want it to fit do i need to write a script to capture the
> --version output and
> perform some parsing and tabling magic or is there an option to tell vim to
> query the system with maybe a call to tput cols

Maybe

    vim --cmd ":version | :q"

will do what you need?

Danek

--
--
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/20190614235746.GA30825%40comfychair.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: any way to format vim --version?

tooth pik
On Fri, Jun 14, 2019 at 6:57 PM <[hidden email]> wrote:

>
> On Fri, Jun 14, 2019 at 06:29:46PM -0500, tooth pik wrote:
>
> > inside vim :ver has been beautified to list features in as many columns as will
> > fit the window, but out at the bash prompt vim --version seems limited to four
> > columns of features, causing the display to scroll off the top of my screen if i
> > let --version print all of the Compilation and Linking lines
> >
> > i have attempted to make those last two lines readable with
> >
> > vim --version | awk '!/^Compilation/ && !/Linking/'
> > vim --version | grep '^Compilation' | fmt -w $(( $(tput cols) - 2 ))
> > vim --version | grep '^Linking' | fmt -w $(( $(tput cols) - 2 ))
> >
> > if i want it to fit do i need to write a script to capture the
> > --version output and
> > perform some parsing and tabling magic or is there an option to tell vim to
> > query the system with maybe a call to tput cols
>
> Maybe
>
>     vim --cmd ":version | :q"
>
> will do what you need?

indeed it does -- thx danek -- brilliant!

--
--
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/CALfSX1xuCSqOp3qBSFgWdZL4LSAD7PA-yzqjBEx0RspbEDNOjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.