From 59c65bfa53e67d06ad4273f22009abaa2925dfbc Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Wed, 17 Nov 2021 23:02:29 -0500 Subject: [PATCH] journal vim headers --- fish.configlink/functions/note-header.fish | 2 +- nvim.configlink/init.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fish.configlink/functions/note-header.fish b/fish.configlink/functions/note-header.fish index 84df107..6dd8408 100644 --- a/fish.configlink/functions/note-header.fish +++ b/fish.configlink/functions/note-header.fish @@ -1,4 +1,4 @@ function note-header set -g CURRENT_WEATHER (curl -s "https://wttr.in/?format=1") - set -g JOURNAL_HEADER "[Yesterday]($YESTERDAY_NOTE.md) | [Home](home.md) | [Tomorrow]($TOMORROW_NOTE.md)\n\n$LONG_DATE\n$CURRENT_WEATHER\n#journal\n\n---\n\n" + set -g JOURNAL_HEADER "[Yesterday]($YESTERDAY_NOTE.md) | [Home](../home.md) | [Today](obsidian://advanced-uri?daily=true) | [Tomorrow]($TOMORROW_NOTE.md)\n\n$LONG_DATE\n$CURRENT_WEATHER\n#journal\n\n---\n\n" end diff --git a/nvim.configlink/init.lua b/nvim.configlink/init.lua index d49382f..882ecc8 100644 --- a/nvim.configlink/init.lua +++ b/nvim.configlink/init.lua @@ -551,6 +551,7 @@ key("n", "gr", ":!gh repo view -w", {silent=true}) key("n", "tt", [[exe 'edit $NOTES_PATH/journal/'.strftime("%Y-%m-%d_%a").'.md']] ) +key("n", "jj", ":!journal:e") -- Window commands key("n", "wv", ":vsplit") @@ -567,7 +568,7 @@ key("", "tL", ":Tabularize /---") -- Vimrc editing key("n", "fv", ":edit $MYVIMRC") key("n", "rr", ":luafile $MYVIMRC") -key("n", "rp", ":luafile $MYVIMRC:PackerInstall:PackerCompile") +key("n", "rp", ":luafile $MYVIMRC:PackerInstall:") key("n", "rc", ":luafile $MYVIMRC:PackerCompile") -- Keep cursor in place @@ -586,3 +587,4 @@ key("t", "", "") --- Exit terminal mo key("n", "", ":noh", {silent=true}) --- Clear search in VimWiki key("n", "Y", "y$") --- Copy to end of line key("v", "", "y:%s/+//gc") --- Substitute selected +key("v", "D", "y'>p") --- Duplicate selected