diff options
author | June McEnroe <june@causal.agency> | 2020-12-18 23:49:12 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-18 23:49:12 -0500 |
commit | 01e3c102be77d2319390dc45d0aefdf22ff8fdee (patch) | |
tree | e4a7904fec5e8737611587a92d62939e45ff49db | |
parent | Add scripts to download, compress and tag IETF RFCs (diff) | |
download | src-01e3c102be77d2319390dc45d0aefdf22ff8fdee.tar.gz src-01e3c102be77d2319390dc45d0aefdf22ff8fdee.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | home/.config/nvim/init.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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 <leader>a m':0/^#include <<CR>:nohlsearch<CR>O#include < nmap <leader>l :0read ~/src/etc/agpl.c<CR>'' nmap <leader>L :0read ~/src/etc/gpl.c<CR>'' nmap <leader>d :0delete<CR>:0read !date +'.Dd \%B \%e, \%Y'<CR> + +command! -nargs=1 RFC :silent noswapfile view ~/src/rfc/rfc<args>.txt.gz +autocmd BufRead rfc*.txt.gz + \ setlocal keywordprg=:RFC iskeyword=a-z,A-Z,48-57,.,-,[,] | + \ nmap <buffer> <silent> gO :call search('^Table of Contents', 'bcs')<CR> |