Giter Site home page Giter Site logo

vim-rfc's Introduction

vim-rfc lists all existing RFCs and opens the selected one in a new buffer.

Works in Vim and Nvim, but it requires python3 support: :echo has('python3')

vim-rfc in action

Installation

Use your favorite plugin manager.

Using vim-plug:

Plug 'mhinz/vim-rfc'

Restart Vim and :PlugInstall, then have a look at the docs: :h rfc.

Usage

List documents:

:RFC [vim regexp]

Rebuild cache and list documents:

:RFC! [vim regexp]

Use <cr> to open an entry or q to quit.

Examples: :RFC, :RFC 100, :RFC http/2, :RFC ipv4 addresses.

Within a RFC document, if you are on a line from the table of contents, <c-]>/<cr> will jump to the referenced section. On a string like STD 10 or RFC 1234 (which should also be highlighted), it opens the referenced document instead. Use <c-o> to jump back.

Configuration

There are no options, but you can change the default colors used in the window opened by :RFC. See :h rfc-colors.

Implementation

This first time this plugin is used, it takes a few seconds to download an index file containing all existing RFC documents (~12 MB). That XML file is parsed and all RFC and STD entries get stored in a cache file.

The second time this plugin is used, the cache file will be used right away.

If you select an entry, it gets downloaded and immediately put into a new buffer. There is no temporary file created on the disk.

Default cache file locations:

  • $XDG_CACHE_HOME/vim/vim-rfc.txt for Vim
  • $XDG_CACHE_HOME/nvim/vim-rfc.txt for Nvim

If $XDG_CACHE_HOME is not set, it defaults to ~/.cache.

Author and Feedback

If you like my plugins, please star them on Github. It's a great way of getting feedback. Same goes for issues reports or feature requests.

vim-rfc's People

Contributors

andreaswachowski avatar andrey-starodubtsev avatar grepsuzette avatar mhinz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vim-rfc's Issues

Download doesn't work through proxies

Hi,

at work all of our traffic goes through a proxy, configured with the $http_proxy/$https_proxy environment variable. This plugin doesn't seem to support that situation, so I'm getting this:

Error detected while processing function rfc#query:
line   33:
Errno::ENETUNREACH: Failed to open TCP connection to www.rfc-editor.org:80 (Network is unreachable - connect(2) for "www.rfc-editor.org" port 80)

It would be great if proxy support could be added. Thanks!

Move ~/.vim-rfc.txt to ~/.cache/

We should avoid unnesseary putting files into user home. We could move it into ~/.cache, or add an option to let the user specify where to store the file.

Rfc-editor.org now requires https?

On my new computer I don't manage anymore to get vim-rfc work.
The ruby code runs.

RFC! will fail to build the cache.
~/.vim-rfc.yaml exists but ~/.vim-rfc.xml file is not here.

Was wondering if maybe it's because now
https://www.rfc-editor.org/in-notes/rfc-index.xml requires https (this is a different source than in #4).

Anyway I can do without for now but thought I would open an issue about this.

HTTP 403 on Index Retrieval

When the index is retrieved on the first request, it fails with:

HTTP Error 403: Forbidden
Fetching RFC index failed. Connected to the internet? Behind proxy?

I am connected though, and can open https://www.rfc-editor.org/in-notes/rfc-index.xml in the browser.

I think one should be able to reproduce this by deleting the cache file so the the index has to be downloaded again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.