From 01e3c102be77d2319390dc45d0aefdf22ff8fdee Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 18 Dec 2020 23:49:12 -0500 Subject: Add :RFC vim command to view IETF RFCs This sets iskeyword so that ^] will work for the kinds of tags generated by rfctags.pl, and keywordprg so that K on another RFC number will view that one. It also binds gO to jump to the table of contents of the RFC. --- home/.config/nvim/init.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'home') diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 9245ccf4..d4bad8eb 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -35,3 +35,8 @@ nmap a m':0/^#include <:nohlsearchO#include < nmap l :0read ~/src/etc/agpl.c'' nmap L :0read ~/src/etc/gpl.c'' nmap d :0delete:0read !date +'.Dd \%B \%e, \%Y' + +command! -nargs=1 RFC :silent noswapfile view ~/src/rfc/rfc.txt.gz +autocmd BufRead rfc*.txt.gz + \ setlocal keywordprg=:RFC iskeyword=a-z,A-Z,48-57,.,-,[,] | + \ nmap gO :call search('^Table of Contents', 'bcs') -- cgit 1.4.1