A pager with explicit (un)wrap-long-lines key bindings and/or options
parv at pair.com
parv at pair.com
Wed Dec 17 13:33:59 UTC 2014
Nikos wrote on Wed Dec 17 12:24:38 UTC 2014 ...
>
> in message <20141217120919.GA91144 at holstein.holy.cow>,
> wrote parv at p thusly...
> >
> > I am looking for a pager that has EXPLICIT options and/or key bindings
> > (preferred) to set & unset wrapping of long lines[0].
> ...
> > Environment variable, LESS, is set to "-SsIXR -x4"[1]. less has
> > only a option to now wrap long lines (-S | --chop-long-lines).
> > Listed in the manual page is that default is not to wrap. (Well,
> > invoking less as "\less" does not override the "-S" in LESS.)
> ...
> > [1] As to obvious reason to not set "-S" in LESS: setting the -S
> > option is helpful most of the time where seeing extra
> > characters can be deferred.
>
> While less is running, you can switch from chop to fold and
> reversely by pressing -S. Is this what you want?
Oh, yes! Exactly that behaviour is what I had wanted. Thanks, Nikos.
That reminded me to re-read the option modification section, in
particular ...
-+ Followed by one of the command line option letters this will
reset the option to its default setting and print a message
describing the new setting. (The "-+X" command does the same
thing as "-+X" on the command line.) This does not work for
string-valued options.
...
-! Followed by one of the command line option letters, this will
reset the option to the "opposite" of its default setting and
print a message describing the new setting. This does not work
for numeric or string-valued options.
... so sending text to "less -+S" via pipe worked as expected.
And, that stalled the creation of vi(m)-as-pager until some later
date. To that end ...
Pipe Vim buffer to stdout
http://stackoverflow.com/questions/10686183/pipe-vim-buffer-to-stdout
--
More information about the freebsd-questions
mailing list