💾 Archived View for gemini.ctrl-c.club › ~spookman › gbrowse › README.gmi captured on 2023-06-16 at 19:45:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

Vim GBrowse

A vim plugin for the browsing of Gopher and Gemini.

Dependencies

Installation

It is recommended that you use a plugin manager. I use pathogen, so I just put the `gbrowse` directory in the `bundle` directory. Follow the intructions for whatever plugin manager you use. If you don't use a plugin manager, you probably know what to do anyway, so do it.

Usage

Once GBrowse has been loaded by vim, any file names starting with `gopher://` or `gemini://` will be downloaded and displayed (assuming they are valid URLs).

Bookmarks

GBrowse has a simple but effective bookmarking system.

Display

For Gopher and Gemini pages, GBrowse will format the page. The default formatting options are designed to be as portable as possible, It is recommended that you set these in your .vimrc for a more pleasant experience (HINT: `:dig!` will display the special characters available to your vim!).

Icons for gemini bullets, quotes and lists

Icons to use to draw boxes around gemini preformatted text

GBrowse can optionally pretty-print certain info using figlet

Size of page margin in spaces

Dictionary for Gopher link types

History

Pages you visit are automatically logged to the history file, with the date and time.

Navigation

Other file types

Some sites contain files, such as images, that are not displayable in vim. GBrowse allows you to select how these files are handled:

Other link types

Gopher can contain links to various protocols, such as telnet. I haven't tested these yet, because I don't know where to find any such links in gopherspace. If you know of any, please let me know, or give it a test yourself and let me know how it goes. It _should_ work like this

Subscribing to logs

_Currently, only Gemlog subscriptions are supported, I couldn't find any info on the format of Phlogs. Please contact me if you have any info and I'll implement it_

GBrowse keeps a file, like it does for bookmarks, to manage subscriptions.

Table of Contents

GBrowse keeps a table of contents for gemini files, containing headings from thoughout the file.

TLS Certificates

When loading a Gemini page, GBrowse uses a Trust On First Use (TOFU) policy. This means that the first time you visit a site, we assume that the certificate provided is legitimate. We store it, and if next time a different certificate is provided, we treat that as a malicious attack, and end the transaction.

If you wish (or are required) to use a client certificate, use the `GBrowseUseCert` command to set the certificate to use (tab will autocomplete file names).

Sample setup

This is my settings from my `.vimrc`. If all of these characters display on your system and you have figlet on your path, I suggest trying these settings if you don't feel like experimenting with your own.

let g:gbrowse_use_figlet=1
let g:gbrowse_gemini_bullet="○"
let g:gbrowse_gemini_quote="░ "
let g:gbrowse_gemini_link="⇒"
let g:gbrowse_gemini_box_h="─"
let g:gbrowse_gemini_box_v="│"
let g:gbrowse_gemini_box_tl="┌"
let g:gbrowse_gemini_box_tr="┐" 
let g:gbrowse_gemini_box_bl="└"
let g:gbrowse_gemini_box_br="┘"
let g:gbrowse_gopher_link_displays=get(g:,'g:gbrowse_gopher_link_displays', {"i": " ","0":"▨", "1": "⇒", "3": "✗", "I": "□", "S": "♪", "<": "♫"})

This is my bookmarks file, note how I've added some headings, and the `### Uncategorised` heading at the end (as new bookmarks will be added under there).

## Spookman's bookmarks

### Certificates & security
=> gemini://gemini.susa.net:1965/openssl_cheats.gmi Openssl cheatsheet
=> gemini://makeworld.space:1965/gemlog/2020-07-06-openssl.gmi Openssl commands
=> gemini://makeworld.space:1965/gemlog/2020-07-03-tofu-rec.gmi TOFU explanation
=> gemini://gemini.circumlunar.space:1965/docs/specification.gmi Gemini spec

### General
=> gopher://floodgap.com:70 Floodgap
=> gemini://gemini.circumlunar.space:1965/ Circumlunar

### Uncategorised