How To Show Recently Edited Notes Obsidian Dataview

4 min read Oct 02, 2024
How To Show Recently Edited Notes Obsidian Dataview

How to Show Recently Edited Notes in Obsidian with Dataview

Obsidian's powerful Dataview plugin gives you immense control over how you interact with your notes. One common need is to see a list of your recently edited notes. This can be incredibly useful for quickly picking up where you left off, reviewing recent changes, or just staying organized.

Let's explore how to achieve this using Dataview queries.

Understanding the Basics of Dataview

Before we dive into the query, let's quickly recap the fundamental concepts behind Dataview:

  • [[...]]: This syntax represents a link to another note in your Obsidian vault.
  • file.mtime: This represents the modification time of a file.
  • sort: This function allows you to order your query results.

The Dataview Query

Here's a basic Dataview query to show your recently edited notes:

LIST file.mtime FROM ""
SORT file.mtime DESC

Explanation:

  • LIST file.mtime FROM "": This tells Dataview to list the modification time of all files in your vault. The "" signifies that we're working with all files.
  • SORT file.mtime DESC: This orders the results by modification time in descending order, so the most recently edited notes appear at the top.

Customizing Your Results

This basic query provides a foundation for further customization. Here are some ways to tailor the output:

  • Filtering by Folder:

    LIST file.mtime FROM "My Folder"
    SORT file.mtime DESC
    

    This query restricts the results to files located in the "My Folder" folder. Replace "My Folder" with the path to the folder you want to filter.

  • Showing More Information:

    LIST file.mtime, file.link, file.ctime AS "Created Time" 
    FROM ""
    SORT file.mtime DESC
    

    This query adds the note's link and creation time to the output. You can include other file properties using the file. prefix.

  • Limiting the Number of Results:

    LIST file.mtime, file.link
    FROM ""
    SORT file.mtime DESC
    LIMIT 10
    

    This query limits the output to the top 10 recently edited notes. You can adjust the LIMIT value as needed.

  • Adding a Header:

    # Recently Edited Notes
    LIST file.mtime, file.link
    FROM ""
    SORT file.mtime DESC
    

    This adds a header above the query results. You can customize the header text to your liking.

Going Further with Dataview

Dataview's capabilities extend far beyond basic file listing. You can use it to:

  • Create tables and graphs based on note content.
  • Filter notes based on specific keywords or tags.
  • Perform complex calculations and data analysis.

Conclusion

The Dataview plugin is a powerful tool for working with your Obsidian notes. By understanding its fundamental concepts and exploring its querying capabilities, you can create personalized views to manage, analyze, and understand your notes in new and exciting ways.

Featured Posts