Friday, January 29, 2010

Re: Single-column 'set'?

On Fri, 29 Jan 2010, Tim Chase wrote:

> Benjamin R. Haskell wrote:
> > I just managed to clobber one machine's ~/.vim.local directory
> > (where I keep machine-specific settings). Luckily I have an
> > instance of 'vim' still running with the old settings. Armed with
> > my recent ':redir @a' knowledge (thanks to Brett and wikia), I've
> > managed to save the settings I care about, via:
> >
> > :redir @a
> > :let
> > :set
> > :abbrev
> > :map
> > :redir END
> >
> > But, I was wondering: is there a way to get single-column output for
> > ':set'? The results I got were hard to 'diff'.
>
> My first ugly-but-post-processable idea was to
>
> :set columns=12
>
> (apparently the min allowed..something I hadn't considered before) and
> then each value output from ":set" comes out on its own line (or split
> across multiple lines if too long...but appears unbroken in :redir
> output)
>
> and then restore your previous value for 'columns'. Granted, for
> obvious reasons, your diff will have a mismatched value for 'columns'
> ;-)

Hmm. I like it. Oddly, it only seems to affect the 'redir'ed output,
but it was almost exactly what I was looking for.

--
Thanks,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: