Turn Your Notes Into Flashcards With Roam SR

Ramses Oudt
Ramses Oudt
Turn Your Notes Into Flashcards With Roam SR

While many Roam users store almost everything in their graphs, we often want to memorize bits and pieces to our own memory. While there are several ways to memorize knowledge, the most effective and efficient approach is spaced repetition.

Spaced repetition is a technique for efficient memorization and practice of skills. Instead trying to memorize by ‘cramming’, memorization is far more efficient by spacing out each review. The software schedules the review of items, optimally increasing the duration between reviews. Spaced repetition is slower, but its effectiveness can’t be denied as it allows learners to scale to memorizing hundreds of thousands of items.

The most popular spaced repetition system (SRS) in the world is Anki, a free and open source app and service. However, it requires manual entry of flashcards, which can become burdensome. So, some efforts have been done to bring spaced repetition to Roam, to reduce friction and turn any collection of blocks into flashcards. Notable examples for Roam are Roam Toolkit (a browser extension) or Neuracache (an external service which requires you to upload your database). While those options are fine, they’re not completely frictionless.

Roam SR by Adam Krivka is the first solution that mimics Anki to a large extent, but functions entirely within Roam. In this article, I’ll show you how to install, set up, and use the Roam SR plugin.

How to install Roam SR

Step 1—Get the code blocks.

Click here to go to the official Roam SR page. Next, copy the following blocks:

Step 2—Paste the code blocks in your graph.

Create a page titled roam/sr:

Then, paste the blocks you’ve just copied onto the page:

Step 3—Activate the plugin.

Expand the script bullet and click the red button that says Yes, I know what I'm doing.

The field now turns yellow, indicating the plugin is active. Refresh Roam to ensure the plugin is fully loaded.

That’s it for the installation! Let’s have a look at how to adjust the settings.

Adjusting Roam SR’s settings

While there is a Settings block on the roam/sr page, I recommend you stay away from it unless you know what you’re doing. For now, we’ll only have a look at the roam/css block and the possibilities it gives.

If you’re somewhat familiar with CSS, you’ll see that by default all settings are turned off (they’re commented out with /* */). To activate one, simply remove the comments, like this setting that hides the #sr tag from the block during review:

Marking cards for review

Marking cards for review is easy: simply add the tag #sr to a parent block to turn it into the front of a new flashcard. Any blocks that are nested underneath this parent block will show on the back of the card:

It’s also possible to mark a bunch of blocks as flashcards in one go. To do this, create a parent block with the {{sr}} shortcode (don’t click it yet!) and add blocks underneath that you wish to mark as flashcards:

By clicking the sr button, it will add the #sr tag to every block at one indentation level below, marking them as flashcards:

Cloze deletion

Another way to create flashcards is by adding so-called cloze deletion. This is a flashcard where part of the text is obscured, which is shown once you click the Show answer button.

Cloze deletions are useful when you only want to quiz yourself on part of a block, instead of relying on a question-answer format (when the question is in the parent block and the answer(s) in the child block(s)).

To obscure/delete part of a block’s text, wrap it between ^^ (making it a highlight). Don’t forget to mark the flashcard with #sr:

Creating a cloze deletion flashcard
A finished cloze deletion flashcard

During review, the front of the cloze deletion flashcard shows like this:

Reviewing a cloze deletion flashcard

Reviewing cards

When you activate the plugin, a new button titled REVIEW appears in the left sidebar:

The blue number indicates the amount of new cards up for review; the green number shows how many previously reviewed cards are up for another review.

By clicking the REVIEW button, the main screen will show the first card up in the queue:

With spaced repetition, the trick is to test yourself on the question on the front of the card before clicking the Show answer button.

Once you’ve retrieved the answer from memory, click the Show answer button to see the back of the card:

Finally, score yourself on the accuracy of the answer by choosing one of the options below. Each time you review a card and score yourself, the review interval will be adjusted.

If for any reason you don’t want to score yourself on the current card, click the Skip button. If the card contains an error, click the Flag button. The latter option will add the #f hashtag to the card, which enables you to quickly find it by navigating to the the page titled f in your graph.

Once you’ve reviewed all scheduled cards, the session will end and you will return to the Daily Notes page. You can also end the review session early by clicking the END SESSION button in the left sidebar.

Additional resources

Watch this demo by Roam SR developer Adam Krivka to see the plugin in action and how to install it:



Join the conversation.

Great! Check your inbox and click the link
Great! Next, complete checkout for full access to Think Stack Club
Welcome back! You've successfully signed in
You've successfully subscribed to Think Stack Club
Success! Click here to start your premium onboarding.
Success! Your billing info has been updated
Your billing was not updated