Skip to content

Instantly share code, notes, and snippets.

GitMurf / RemNote-css-block-quotes.css
Created March 1, 2023 02:00
RemNote CSS for block quotes
View RemNote-css-block-quotes.css
/* line up quotes with other bullets */
div.rem.relative.rn-editor__rem.rn-quote {
padding-left: 0px;
margin-left: -4px;
span.rem.relative.rn-editor__rem.rn-quote > div > div.rem-button__container,
div.rem.relative.rn-editor__rem.rn-quote > div.rem-button__container {
left: -48px !important;
GitMurf / RemNote-css-reference-links-formattings.css
Created March 1, 2023 01:57
Custom CSS for tweaking the formatting of Rem references, URL links and pasted website links.
View RemNote-css-reference-links-formattings.css
GitMurf /
Last active August 12, 2022 16:20
Add a couple Outliner capability features to Obsidian's native list handling: Hotkey to select all text in current bullet, select all children bullets, select entire line of non list item text.
const editor = app.workspace.activeLeaf.view.editor;
const getCurSelection = editor.getSelection();
const getCur = editor.getCursor("from");
const curLineNo = getCur.line;
const curLineText = editor.getLine(curLineNo);
const matchBullet = curLineText.match(/^[ \t]*[-\*] (.*)/);
let foundContent = "";
if(matchBullet) {
foundContent = matchBullet[1];
// v0.1
// template to use
const templateFolder = "templates";
const templateName = "";
// creating the new file
const newFileFolder = "test/meetings";
const openNewFile = false;
GitMurf / obsidian.templater.query.section.keyword-page-name.js
Created May 30, 2022 05:53
When using headings with a [[page name]] in it, create a "search embed query" with all those headings expanded
View obsidian.templater.query.section.keyword-page-name.js
const noteName = tp.file.title;
let queryKeyword = await tp.system.prompt("Keyword for Section search query (do NOT add [ ] brackets around it)", noteName);
if(queryKeyword) {
// Un-comment the next line if you want the keyword to require [] brackets around it for backlinks matching purposes
queryKeyword = `\\[\\[${queryKeyword}[\\|\\]]`; // the | pipe check accounts for alias links
tR = `
# Keyword Section Query
View obsidian.templater.other.get-all-links-and-backlinks.js
let startDate = await tp.system.prompt('Start Date');
let endDate = await tp.system.prompt('End Date');
const nlDatesPlugin = app.plugins.getPlugin('nldates-obsidian');
function getNldDate(nlDatesPlugin, dateString) {
let parseResultLink = null;
let parseResult = nlDatesPlugin.parseDate(dateString);
if(parseResult){ parseResultLink = parseResult.formattedString };
if(parseResultLink === "Invalid date") { parseResultLink = null }
View obsidian.templater.editor.selection.turn-into-callout.js
//Set to false if you do NOT want to ask for a custom title or whether foldable or not
const bCustomTitle = true;
const bFoldable = true;
const calloutOptions = ['note', 'abstract', 'summary', 'tldr', 'info', 'todo', 'tip', 'hint', 'important', 'success', 'check', 'done', 'question', 'help', 'faq', 'warning', 'caution', 'attention', 'failure', 'fail', 'missing', 'danger', 'error', 'bug', 'example', 'quote', 'cite'];
let calloutType = await tp.system.suggester(calloutOptions, calloutOptions, false);
if(!calloutType) { return };
calloutType = calloutType.toUpperCase();
const search = app.workspace.getLeavesOfType("search")[0];
let keyword = await tp.system.prompt('Keyword', '[' + '[Journal');
keyword = keyword.replace(/(\[|\])/g, "\\$1");
const searchQuery = `section:(/^#+ ${keyword}.*\\n+\\S[\\s\\S]*[^\\n]/) OR section:(/^#+ ${keyword}.*/ section:(/[\\s\\S]*[^\\n]/))`;
//Collapse=true, Expand=false
//Show Extra Context: true or false
//SortOrder Options: alphabeticalReverse, alphabetical, byModifiedTime, byModifiedTimeReverse, byCreatedTime, byCreatedTimeReverse