From 045b0f59ae497595dff68558dbd26ba90e402c17 Mon Sep 17 00:00:00 2001 From: Marcel Robitaille Date: Thu, 7 Apr 2022 23:58:07 -0400 Subject: [PATCH] [vim] Add vim command for doi2bib Replace current line with the bib of that line's doi --- vim/plugin/doi2bib.vim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 vim/plugin/doi2bib.vim diff --git a/vim/plugin/doi2bib.vim b/vim/plugin/doi2bib.vim new file mode 100644 index 0000000..a6ac4b0 --- /dev/null +++ b/vim/plugin/doi2bib.vim @@ -0,0 +1,7 @@ +function! DOI2BIB() + " Cut the current line and replace with the result of calling `doi2bib` on it. + norm dd + " @ is the unnamed register + exec 'read ! ~/.dotfiles/bin/doi2bib ' . @ +endfunction +command! DOI2BIB call DOI2BIB()