Skip to content

Neovim plugin for browsing webpages like normal files

Notifications You must be signed in to change notification settings

ridulfo/browse.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

browse.nvim

A experimental minimalistic browser for Neovim.

Currently in early development. This repository is public so that the plugin can be shared.

Goal

In the same way that you can gf to a file, doing gf on a url will open it.

The webpage is converted from html to markdown using pandoc and saved to the download directory. This serves as an offline browsing history. Markdown (without svg) does not take much space. The directory structure of the download directory will be the same as the website.

Example usage

Note

Currently does not create pretty tree structure, just replaces / with _.

  1. User: Puts cursor on https://example.com and then press gf.
  2. Nvim: A markdown version of the page is opened in either a new pane or the current one.
  3. User: Finds link example.com/blog/post-123 and puts cursor on it and presses gf.
  4. Nvim: A markdown version of the page is opened in either a new pane or the current one.

This will result in the following directories and files being created in the download directory:

- ~/.browse/
    - example.com/
        - index.md
        - blog/
            - post-123.md

Demo

asciicast

Installation

Just add this to your Lazy.nvim plugins:

{ "ridulfo/browse.nvim", opts = {} },

Default options

{
	download_path = "~/.browse",
}

Options

download_path

  1. left empty, will get the default value
  2. set to a path
  3. set to false, this will disable saving of pages

Required dependencies

  • wget - fetch html page
  • pandoc - convert html to markdown

MacOS

brew install wget pandoc

Debian/Ubuntu

sudo apt install wget pandoc

About

Neovim plugin for browsing webpages like normal files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published