-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[help] Get details of citation under cursor #2946
Comments
Yes. You can use |
Thanks a ton @lervag for anyone stumbling here, looking for similar. I use zotero with better-bibtex to export bib files (file entry is automatically included). keymap below allows to open corresponding pdf when cursor is on the citation key.
|
No problem; thanks for the request! Notice, just in case you were not aware, that there is already a context feature that sort of provides what you are looking for here. See
I think this is a slightly improved version: vim.keymap.set('n', '<leader>zo', function()
local citation_entry = vim.fn['vimtex#cite#get_entry']()
job:new({
command = '/path/to/sioyek',
args = { citation_entry.file },
detached = true,
}):start()
end, {desc='Open pdf related to citations'}) |
Thanks for the improved version! I wasn't aware of context menu support, this issue seems redundant in the context. I tried, but |
You can try to change the |
Thank You for bearing with me 🚀 probably just a reminder to self about reading doc properly! |
No problem :) Notice, using the context function means several key presses. If you frequently want to just open the corresponding pdf, then having the direct version you asked for in this issue makes sense. That's why I didn't immediately mention the context feature. ;) |
I'm trying to write a script that could open pdf linked to citation under cursor. Since vimtex parses bibtex files linked, is it possible to get entire details for the citation key under cursor ?
The text was updated successfully, but these errors were encountered: