summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-19 01:02:02 -0500
committerJune McEnroe <june@causal.agency>2020-12-19 01:02:02 -0500
commitc92045e4bba2c7d2870ca8f80757ecf78a3ad08d (patch)
tree4bfe688ebf5e74f90d035c353653df3075d88e5c /home
parentInclude rfc-index.txt in RFC sync (diff)
downloadsrc-c92045e4bba2c7d2870ca8f80757ecf78a3ad08d.tar.gz
src-c92045e4bba2c7d2870ca8f80757ecf78a3ad08d.zip
Open rfc-index.txt for :RFC without argument
Diffstat (limited to 'home')
-rw-r--r--home/.config/nvim/init.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim
index d4bad8eb..b814666b 100644
--- a/home/.config/nvim/init.vim
+++ b/home/.config/nvim/init.vim
@@ -36,7 +36,10 @@ 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
+command! -bar -nargs=? RFC
+	\ if !empty(<q-args>) |
+	\ silent noswapfile view ~/src/rfc/rfc<args>.txt.gz |
+	\ else | RFC -index | endif
 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>