From 0aaf713e5ea83908761964e121f617737bf76fde Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 21 Dec 2020 17:59:16 -0500 Subject: Move rfc.vim to doc/rfc That default path is a bit wonky, but it prevents having to template rfc.vim for basically no reason. --- home/.config/nvim/plugin/rfc.vim | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 home/.config/nvim/plugin/rfc.vim (limited to 'home/.config/nvim/plugin') diff --git a/home/.config/nvim/plugin/rfc.vim b/home/.config/nvim/plugin/rfc.vim deleted file mode 100644 index e04d02eb..00000000 --- a/home/.config/nvim/plugin/rfc.vim +++ /dev/null @@ -1,26 +0,0 @@ -if !exists('g:rfc_path') - let g:rfc_path = '~/src/doc/rfc' -endif - -function! s:RFC(number) - let number = (empty(a:number) ? '-index' : str2nr(a:number, 10)) - let path = expand(g:rfc_path . '/rfc' . number . '.txt.gz') - if filereadable(path) - execute 'silent' 'noswapfile' 'view' path - else - echohl ErrorMsg | echo 'No such RFC' a:number | echohl None - endif -endfunction - -function! s:BufRead() - setlocal readonly - setlocal keywordprg=:RFC - setlocal iskeyword=a-z,A-Z,48-57,.,[,],-,_ - nmap gO :call search('^Table of Contents', 'bcs') -endfunction - -command! -bar -nargs=? RFC call s:RFC() -augroup RFC - autocmd! - autocmd BufRead rfc*.txt.gz call s:BufRead() -augroup END -- cgit 1.4.1