Building a "Cheatsheet" note with snippets collected from the Vault

What I’m trying to do

I am trying to create a “Cheatsheet” note. In my vault, I have a lot of snippets for running bash commands. For instance

How to view local files


This is a nice format, because I can just click on “copy” to copy the command to my clipboard then paste.

Over time, I want to collect all these commands from separate notes in my vault in one “” note, where I can always have open and just look at the commands aggregated over time from other notes, while (ideally and optionally) still being able to click to copy.

This is similar to what the “tasks” plugin does, but I want it to render based on a particular tag or search index so that I can tell when I want the command to show up.

I am looking for suggestions on how to achieve this, or alternatives to consider.

Things I have tried

I’ve tried looking at dataview, but I couldn’t get it to work and the learning curve is high there, it feels like I would need a lot of javascript knowledge just to check if that works.

Creating each command under its own section and adding a tag has given a way for me to search for commands based on tag, but I would really like it to show up on a single .md file.

1 Like

I would use dataview inline fields. Create a template that you can insert in your daily notes or other files when you want to log a command. Then use dataview query in your cheatsheet to pull all commands.

bash_command:: LS
Bash_note:: How to view local files

Then make dataview query in your cheatsheet note

Table without ID
Bash_Command As "Command", Bash_Note As "Note", As "Source File"
From ""
where Bash_Command
sort Bash_Command



And how would you ensure that the command and description stay together when you are using the page scope?

In most cases, they’re better off using a list/task item for stuff like this. If using a task, you can also have task links back to the origin of the command.

1 Like

I have always used this method whether in table format or list and never had an issue with fields staying together. The source File is a link to the file containing the source of the inline field. The first two commands are two separate entry’s in the 2023- 5-29_Mon daily note and then one entry in the Sunday daily note.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.