Created
August 26, 2021 03:31
-
-
Save GitMurf/33e27f28683676b011d4d15710652030 to your computer and use it in GitHub Desktop.
Run this templater script to open the Search sidebar and search for all open Tasks on the current page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const search = app.workspace.getLeavesOfType("search")[0]; | |
let thisFile = app.workspace.getActiveFile(); | |
search.view.setSortOrder("byCreatedTime"); | |
search.view.setCollapseAll(false); | |
search.view.setExtraContext(true); | |
let myString = thisFile.basename; | |
search.view.setQuery(`file:("${myString}") task-todo:(/^./)`); | |
app.workspace.revealLeaf(search); | |
%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment