citation.vim icon indicating copy to clipboard operation
citation.vim copied to clipboard

Open a reference's file with a custom program

Open Djoop opened this issue 2 years ago • 3 comments

Hi, I'm using a lot citation.vim to open the articles (the actual pdf files). Following the readme I'm using

nnoremap <silent>[unite]co :<C-u>Unite -input=<C-R><C-W> -default-action=start -force-immediately citation/file<cr>

It works well but the files are opened with the default pdf viewer. I do use 2 different pdf viewers depending on whether I want to read or annotate the articles, so how could I adapt the previous command to open the article with a custom program? The fact that it goes through unite makes it difficult for me to understand how the command above can be adapted… maybe it's actually more a question related to unite than this plugin, but I'm not sure.

Djoop avatar Jul 07 '22 12:07 Djoop

Yeah unite. But then, its still just your system tool. On Linux I think its xgd-open. You can set your defaults in these tools.

rafaqz avatar Jul 07 '22 16:07 rafaqz

Thanks. But so what if I don't want to change the default but really define a new shortcut… is there a way to just fetch the path to the file and just use it in any custom command? Or the only way is via citation/file, and thus really via unite? Well if it is the only way, I'll double check unite documentation and this can be closed.

Djoop avatar Jul 08 '22 07:07 Djoop

Im not sure, check the unite docs.

rafaqz avatar Jul 08 '22 07:07 rafaqz