any way to format vim --version?

18 views
Skip to first unread message

tooth pik

unread,
Jun 14, 2019, 7:30:06 PM6/14/19
to vim...@googlegroups.com
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

duv...@comfychair.org

unread,
Jun 14, 2019, 7:57:54 PM6/14/19
to vim...@googlegroups.com
Maybe

vim --cmd ":version | :q"

will do what you need?

Danek

tooth pik

unread,
Jun 14, 2019, 8:16:20 PM6/14/19
to vim...@googlegroups.com, duv...@comfychair.org
indeed it does -- thx danek -- brilliant!
Reply all
Reply to author
Forward
0 new messages