Tuesday, February 5, 2013

Re: Three questions...

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAlERKLUACgkQ0O/mSH/wJhtn7QCdHY8PXeHyLdCGKxqa176C3/RS
NXQAoJdBlVxZVE/NNNa3Y6AV4qNicde6
=vziM
-----END PGP SIGNATURE-----
On Tue, 5 Feb 2013 14:21:43 +0100, Marco wrote:
> On 2013–02–05 Aggelos Kolaitis wrote:
>
> > 1). Open the help window in the current window.
>
> :h foo | only

This isn't quite the same behavior if there are other windows open
(window A, and window B, with focus on window A; it will close window
B too). However, this alternative functionality might be usefully
when that behavior *is* what the OP wants :-)

Aggels wrote:
> 2). Open links using lynx.
> While browsing the help, I sometimes encounter www links that
> I have to manually access from firefox or any other browser. Can I
> open them using lynx right inside vim??

You could use something like

:let url=expand('<cword>')|tabnew|exec 'r! lynx -dump '.url

You might have to do something to properly capture the URL (rather
than using the blunt-force "<cword>" expansion), and you might need
to escape certain characters in the URL before dumping it into a
command-line. But otherwise, the basics are in there and can be
mapped if needed.

-tim

No comments: