-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 13/03/2012 07:05, Tony Mechelynck wrote:
> On 09/03/12 21:41, Phil Dobbin wrote:
>> -----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...
>
> It assumes that you are using a Vim version compiled with +syntax and
> +quickfix, which usually means a Normal version or better (check near
> the top of the output of the :version command). In addition, in order to
> see syntax highlighting you have to enable it, by means of one (any one)
> of the following lines in your vimrc:
>
> syntax on
> or
> source $VIMRUNTIME/vimrc_example.vim
> or
> runtime vimrc_example.vim
Hi, Tony.
The console Vim on my OS X box I compiled features=huge & no gui so it
has +syntax +quickfix & in my ~/.vimrc syntax is on.
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/
iQEcBAEBAgAGBQJPXxN9AAoJEKpMeDHWT5AD8KkH/0Z0WQCdGytpUsEHvimpSAPj
PhwdG186QoTNWMgvDq47sv5c8W1a9c0aXk1iD5sTf6ZNpXwTRXVfaSQ6qzuY0eTF
aABt8U1AJ/843wUDXsYALeFKowhADheysdyvhyIgEtJH+Kn5K/JoXCceeWptMoZk
+bcoCJQGE/R0puvjRwOZJNx56S87+TbqMCGFr/tz2ZR7zCK65acHKPfg16ANq74i
fV1pTR2HJeUW3awp4PjUTh1Y4lIUWVc0lsB3KCN6r/i87k/3UmRyFFbBeHnv1zRG
P8KttGeMh4yB0SAWRJstdy841rDbrbyjGKVswog+Rbcbjp/WXyxMN8Ax+6ZbMsY=
=IVk4
-----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