const execSync = require('child_process').execSync; | |
const spawnSync = require('child_process').spawnSync; | |
async function compile(input, context) { | |
// This is undocumented and could break. | |
let basePath = context.app.vault.adapter.basePath; | |
if (!basePath.endsWith("/")) { | |
basePath = basePath + "/"; | |
} |
# macOS | |
cd "path/to/your/vault" | |
awk 'FNR <= 1 && /^---$/{print FILENAME}' **/*.md | | |
xargs -I {} sed -i '' -E '1,/^---$/ s/(\[\[.*]])/"\1"/g' "{}" | |
# Linux (or macOS users with GNU sed) | |
cd "path/to/your/vault" | |
awk 'FNR <= 1 && /^---$/{print FILENAME}' **/*.md | | |
xargs -I {} sed -i -E '1,/^---$/ s/(\[\[.*]])/"\1"/g' "{}" | |
body { | |
/* [...] redacted customizations [...] */ | |
--file-margins: var(--size-4-5); | |
} | |
.cm-vimCursorLayer { | |
animation: none !important; | |
} |
In Neovim, the .
character repeats "the most recent action"; however, this is not always respected by plugin actions. Here we will explore how to build dot-repeat support directly into your plugin, bypassing the requirement of dependencies like repeat.vim.
When some buffer-modifying action is performed, Neovim implicitly remembers the operator (e.g. d
), motion (e.g. iw
), and some other miscellaneous information. When the dot-repeat command is called, Neovim repeats that operator-motion combination. For example, if we type ci"text<Esc>
, then we replace the inner contents of some double quotes with text
, i.e. "hello world"
→ "text"
. Dot-repeating from here will do the same, i.e. "more samples"
→ "text"
.
<%* | |
//OPTIONS: TOP / BOTTOM | |
const whereToWrite = "TOP"; | |
//OPTIONS: COPY / MOVE | |
const copyOrMove = "COPY"; | |
//Find leaf next door | |
const thisLeaf = app.workspace.activeLeaf; | |
const thisFile = thisLeaf.view.file; | |
let leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right"); | |
if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");} |
/* RAINBOW INDENT COLORS */ | |
:root { | |
/* default */ | |
--font-use-default: var(--default-font); | |
--font-size-use-default: var(--editor-font-size); | |
--indent-use-default: 1.8ch; | |
/* ------- */ | |
/* theme */ | |
--font-use-theme: inherit; |
// Function to convert number of seconds into Hours::Minutes::Seconds | |
function minutesSeconds(s){ | |
return(s-(s%=60))/60+(9<s?':':':0')+s; | |
} | |
// The Main Function | |
function start(){ | |
// Current Page | |
var currentURL = window.location.href; |
<% tp.user.getNotSetBaclinks(tp.file.path(true), this.app)%>