diff --git a/plugin/papis.vim b/plugin/papis.vim index 436f2a7..12aa5d6 100644 --- a/plugin/papis.vim +++ b/plugin/papis.vim @@ -26,14 +26,11 @@ function! s:handler(a) let candidates = [] for line in citations let id = matchlist(line, pat)[1] - call add(candidates, "\\cite{". id . "}") + call add(candidates, substitute(id, "/", "", "g")) endfor endif - for candidate in candidates - execute join([cmd, candidate]) - endfor - + execute "normal a\\cite{" . join(candidates, ", ") . "}\egql" endfunction