jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
159 stars 13 forks source link

Added a new function to be able to make a selection of the annotations #85

Closed adam-coates closed 1 month ago

adam-coates commented 1 month ago

Oftentimes when I have returned to an article later after making annotations I sometimes like to make new annotations. In neovim if I want to import the annotations again then they all get imported again and I have to delete the old ones. Instead of this I thought about why not make it so that annotations could be selected from a list.

In this case the functionality largely remains the same as :Zannotations except I've added a new command called Zselectannotations

Now once run, the user picks an author from the list according to the search key then a second dialogue appears in which the user can then select from the list as many annotations as they'd like by pressing enter. Then once finished pressing esc to close the dialogue and the selected annotations are inserted into the current buffer.

A use case for this is that if the user wants to order the annotations in a way they can now select specific annotations that they need.

adam-coates commented 1 month ago

I should note - i have grouped annotations together. Usually Zannotations returns a list of all quotes marked with a > prefix and the note created by the user itself and these are separate by a newline.

Here I've grouped annotations in the list by the users note that accompanies the annotation (quote) itself. Unless an annotation is without a note then in the available list only the annotation is displayed.

This is because when importing annotations the note and the quote should probably stay together as 1 import (otherwise they'd be imported separately)

jalvesaq commented 1 month ago

Thanks! I'm travelling without my laptop. But I'll see this on the weeekend.

adam-coates commented 1 month ago

No problem, no stress!

jalvesaq commented 1 month ago

Good job! It's a nice feature.

adam-coates commented 1 month ago

Thanks, glad it works out.