Thursday, February 3, 2011

Re: Manpage inside Vim

On Feb 3, 6:12 am, Marco <net...@lavabit.com> wrote:
> On 2011-02-03 Joan Miquel Torres Rigo <joanmiq...@mallorcaweb.net> wrote:
>
> > >> >> Fore example:
> > >> >> :!TERM=xterm man ls
> > >> > Doesn't work, either.
>
> > >> Ok. But try now with 'dumb'.
>
> > > Same result.
>
> > Maybe you can try a slightly different strategy like
>
> > :tabedit | :r ! man ls
>
> Works. Thanks
>
> Marco

When I try that, formatting control characters are shown.

I have add the following function to .profile then from a terminal
command line it makes a clean text file in terminal vim. Maybe parts
of it can be incorporated in the command from Joan Miquel Torres Rigo.

vman() { man "$@" | col -bx | iconv -c | vim -c 'set ft=man nomod
nolist' -; }

col -- filter reverse line feeds from input
-b Do not output any backspaces,
printing only the last character written to each column position.
-x Output multiple spaces instead of tabs.

iconv -- character set conversion
-c When this option is given,
characters that cannot be converted are silently discarded,
instead of leading to a conversion error.

-Bill

--
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

No comments: