-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/03/2012 19:33, sc wrote:
> On Fri, Mar 09, 2012 at 07:05:58PM +0000, Phil Dobbin wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> 
>> Hi, all.
> 
>> I quite often send various man pages & the like to Vim like so:
> 
>> `$ man foo | ul -i | vim -`
> 
>> which works great but it tends to bring with it some non-ASCII,
>> control & null (ASCII0) characters with it. When doing this on OS
>> X I've been sending the file to BBEdit which has a Zaps Gremlins
>> command which rids me of the offending characters so then I can
>> use :harcopy in MacVim to save the resultant file as a PDF.
> 
>> Is there anyway I can zap these gremlins from inside Vim &
>> therefore negate the BBEdit part of the workflow? It'll also free
>> me up to do it on my Linux boxes too.
> 
> you can put the following in your ~/.bashrc:
> 
> function vman() { man "$@" 2>&1 | col -bx | iconv -c | vim -c 'set
> ft=man nomod nolist' -c 'call Hideme()' -; }
> 
> (all one line)
> 
> where Hideme() is defined in your .vimrc as
> 
> function! Hideme() setlocal noswapfile setlocal buftype=nofile 
> setlocal bufhidden=hide endfunction
> 
> i use it a lot and never see any gremlins, with the added benefit
> of syntax highlighting on the man page


It doesn't work on my OS X box (I haven't checked it yet in Fedora or
Debian). The gremlins are still present & there's no syntax
highlighting in the man pages.

Cheers,

  Phil...

- -- 
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

        Wm. Shakespeare - Much Ado About Nothing


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPWmrnAAoJEKpMeDHWT5ADy10IAMq9Z1BJMa4bdPAFBTJLx+YD
/lTPySJR7DRuWpX1A6Sj6A7l9+xEjlLsZeNmBjQ1UFxeAr1hGxuMInb91MIjt1TM
PoUluZDt6yxNZtJfmw0YQKhUqcLzEKuS83D+IAM6YKrJLmCAbItoPNCZ1p9EeBl1
Vd9WtqduuK5MZDMmcA7WSP2M4qy6V4a6exn+8UfsTctlBaHs7dZlMO18YAF1N2ey
HwoeziILpxVpMK6XWxK5jRboHKKXy0JG0GPe6WjNXl69eKglLiR8gLE9u6hyGDG8
ABAuaBIP/b+1QuWcodbeQ70OSvQdNPQfHK4nxVOlmO3TPUR54ymncU67UbIuiqs=
=zSXv
-----END PGP SIGNATURE-----

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

Reply via email to