-
Notifications
You must be signed in to change notification settings - Fork 17
Vim
@lervag (author of apy
): This is my own workflow for quickly adding cards
with apy + Vim.
I use a set of personalized "snippets" or mappings that I use to easily convert lists of questions and answers into proper markdown.
One example of the workflow is something like this:
-
vim notes.md
-
Write a list of new questions/answers, e.g.
topic Q: question1 continued lines (no blank lines) A: answer1 Q: question2 A: answer2 long answer (no blank lines) Q: ... A: ...
-
With Vim cursor inside the above block of text, I type
<space>aa
to convert the notes. This executes theCreateNotes()
function (see link above), with the result:# Note model: Basic tags: topic ## Front **topic** question1 continued lines (no blank lines) ## Back answer1 # Note model: Basic tags: topic ## Front **topic** question2 ## Back answer2 long answer (no blank lines) # Note model: Basic tags: topic ## Front **topic** ... ## Back ...
-
Now I save the file and do
apy add-from-file notes.md
. Done.
In practise, I use Vim also to take notes in general. I have my Vim based notes available with a simple shortcut, and so it is always easy to add a note whenever I work on something or read something. I tend to add questions and answers in a similar format as specified above to my Vim based notes, and then with regular intervals I convert them and add them to Anki.