Scroll to navigation

VF1-TUTORIAL(7) Miscellaneous Information Manual VF1-TUTORIAL(7)

NAME

vf1-tutoriala tutorial for the vf1(1) command line gopher client

USAGE

vf1(1) is built around an interactive command prompt, and has a very “REPL” feeling. You can safely unplug your mouse the entire time you are using vf1(1). :)

There's a comprehensive list of the available commands on the vf1(1) man page.

Start VF-1:

vf1

Well, let's start off by heading to SDF to check out some nice phlogs! Use the go command:

VF-1> go sdf.org/

If you are lazy, you can type ‘g sdf.org/’ instead, i.e. you can abbreviate go to g.

You should see a listing of the SDF Gopherspace. The different menu items are indicated by numbers in square brackets, and the SDF Member PHLOGOSPHERE is option [1], so go ahead and type 1 and then enter:

VF-1> 1

You should see all the phlogs fly by, and unless you have a very large monitor some have probably run off the top of the screen. This will not be an uncommon problem, and there are various ways to deal with it. Obviously, you can scroll up in your terminal like always, but VF-1 gives you other ways to deal with this. After you have visited a gopher menu (as opposed to a document), if you just press Enter (i.e. execute an empty line), VF-1 will print the first 10 items in the menu by themselves (any ASCII art etc. in the original listing is removed in this mode). Each time you press Enter you will see the next ten items in the listing. Page through a few times to get a feel for it. There are other ways to deal with gopher menus which don't fit on one screen, but nothing is faster than just tapping Enter, so it's a good habit to pick up.

If you just want to see which phlogs have been updated lately, seeing the first 10 or 20 menu items is probably enough for you. But suppose you are really curious about one phlog in particular. Say you want to know what Tomasino has been up to. You could search for his phlog specifically:

VF-1> search tom

If you are lazy, you can use / instead of search, i.e. / tom.

This will show you the phlogs with “tom” in them (it's a simple case-insensitive search). Tomasino will probably be [1] or [2] (depends whether tomatobodhi has updated more recently :). So go ahead and type 1 and hit enter again to enter Tomasino's gopherhole. Then you can type 2 and enter to go to his phlog, and then 1 and enter to read his most recent entry.

Suppose now you want to go back to the main SDF phlog listing. Let's check out your history:

VF-1> history

If you are lazy, you can abbreviate history to hist, and in fact if you are very lazy you can just use h.

You should this time see a menu of the few places you've been so far. The phlogosphere list will probably be [2], so type 2 and enter to go back there. By now you are probably getting the hang of using numbers to get around.

For this next bit, let's focus on gunnarfrost's phlog, because he writes very nice short entries which work well for this. Once you're at the main phlog listing, do a:

VF-1> search frost

To easily find gunnarfrost's phlog and then press 1 to type the first entry.

Short and sweet! Now, suppose you want to read his next post. You use the back command to go back to the menu listing and then press 2, and then do back and 3, back and 4, etc. But it's much easier to just type:

VF-1> next

Or, if you are lazy, just n.

This will automatically take you to the next item in the most recently seen gopher menu after the one you just viewed. So you can just hit n and enter again and again to flip through the pages of gunnar's phlog. Each one is much shorter than a full screen, so this works very nicely.

Lately gunnarfrost is a good phlogger and wraps his entries at 70 or 80 chars or thereabouts. But if you keep hitting n you'll get to early entries where the lines just keep going until your terminal wraps them (sorry, gunnarfrost, I don't mean to single you out here, plenty of other folk do this too!). Once you've found one of these, try running:

VF-1> fold

And VF-1 will wrap the lines at 80 chars for you (assuming you have the fold(1) command installed on whatever system you are using). This isn't the only helper command of this kind available. Get back to the main SDF phlog listing (either by running back a few times or using hist and a number to jump straight to it) and go to my phlog. Unlike gunnarfrost, I appear to be physiologically incapable of writing phlog posts which are less than a few whole screens long. Go to one of these posts, and watch the lines fly by. Now try:

VF-1> less

This will pipe my giant entry through less(1), so you can move back and forth and read it. Just press q when you're done like usual to get your VF-1 prompt back. You can also use less to navigate long menus, and unlike hitting Enter to page through items 10 at a time, less will preserve non-entry lines, so you can see ASCII art etc.

I usually have at least one reference at the end of that entry, formatted as a URL after an index number in square brackets. You might be tempted to pick up your mouse, highlight the URL, type go and then paste the URL to visit it. Put that rodent down! The mouse, that is, not the gopher. Instead, try this command:

VF-1> links

VF-1 will then scan the most recently viewed post for URLs. Well, actually, it scans for words (i.e. things separated by spaces) which contain "://" and at least one ".". This might not catch all URLs and it might sometimes catch things which are not URLs, but it works well enough for now. You will see a menu and now you can use numbers to follow any of those links without your mouse!

If you want to know the URL of a document you are at so that you can refer to it, just do:

VF-1> url

If you want to save the document, just do:

VF-1> save ~/some/random/path/somefilename.txt

If you're in a hurry, you can just do:

VF-1> save

and VF-1 will try to derive a sensible filename from the current document's URL. There's no guarantee it will be pretty, or easy to remember, though.

Everything so far has been text-based. Gopher items with itemtype 0 (text) are fed to the cat(1) command by default, or to less(1) or fold(1) if you request it. But VF-1 can handle other itemtypes too. Image files with an item type of “g” or “I” will be opened using the feh(1) image viewer (if installed). HTML content with an item type of “h” will be fed to lynx --dump, and audio files with an item type of “a” will be fed to mpg123(1) (e.g. you can listen to jynx's doom metal songs in this way). Obviously if you do not have one of these programs installed, it will not work. Fear not, there's a way for you to customise these handler programs - see the Handlers section below for all the details.

You probably need some bookmarks, right? Here's how to add the current URL to your bookmarks. You can provide your own name, if you want.

VF-1> add

Or, if you are lazy as usual, just a.

If you want to reorganize your bookmarks, just open ~/.vf1-bookmarks.txt using a text editor and do it.

If you want to look at your bookmarks:

VF-1> bookmarks

If lazy, just bm.

Now let's look at two tools for quick and easy navigation through gopherspace, tours and marks.

Sometimes you're looking at a menu and it's very long but you know you want to look at few items, one after another. Assume you're looking at phlogosphere.org, for example. How about adding the first four items to a tour and then going on that tour?

VF-1> tour 1 2 3 4
VF-1> tour

Use the tour command without any arguments to go to the next stop. This is basically your stack of items to go to. And yes, you guessed it. Use t if you're feeling lazy.

Actually, if you're really lazy, you can use ranges, too:

VF-1> tour 1-4
VF-1> tour

But there's more. Let's say you're looking at something pretty interesting, like the list of all the phlogs on phlogosphere.org. How about marking this place with a letter, following some links, and then returning to this location not using a bunch of back and up commands but just that one letter?

VF-1> mark x
VF-1> ... do some stuff ...
VF-1> go x

And yes, m for the lazy.

With this you now have a pretty good idea about how to use and navigate around on VF-1. Happy gophering !!

SEE ALSO

vf1(1)

June 25, 2019 All Operating Systems