15 February 2021

Here’s a way to simplify the number of keystrokes when viewing things from the web using Vim.

Previously, I was typing the following incantation whenever I wanted to view the source of a web-page from the command line:

$ curl <url> | view -

This works, but has some very minor drawbacks. One of them that I run into is that I occasionally forget to add the trailing dash, which usually results in a lot of noisy characters coming through as Vim tries to interpret the output.

Today, by accident, I simply typed the following:

$ view <url>

and it actually worked. The site was fetched using curl in the background and the page opened up in Vim. It even opened with syntax highlighting as the page was downloaded to a temporary file first.


Previous post
Popups for Email Addresses Argh, stop with the popups for my email address while I’m trying to read your blog! How can I enjoy your content when I’m interrupted with these? It
Next post
On the Facebook Watch Ron Amadeo, from Ars Technica, on Facebook considering an Android Watch: The Information says Facebook’s smartwatch push is part of a larger plan