From 5082436dfc19b26540967ce15af8392e3e2dc27f Mon Sep 17 00:00:00 2001 From: aserowy Date: Mon, 18 Nov 2024 12:09:28 +0100 Subject: [PATCH] zk: define folder structure in zk new mappings Signed-off-by: aserowy --- lua/mappings.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index e738946..c48327d 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -50,11 +50,18 @@ end local function zettelkasten() keymaps.register({ "n" }, { - ["zn"] = "ZkNew { title = vim.fn.input('Title: ') }", + ["zn"] = "ZkNew { title = vim.fn.input('Title: '), dir = 'zettel' }", + ["zd"] = "ZkNew { group = 'daily', dir = 'dailies' }", ["zo"] = "ZkNotes { sort = { 'modified' } }", ["zt"] = "ZkTags", ["zf"] = "ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }", }) + + keymaps.register({ "n" }, { + ["zn"] = ":'<,'>ZkNewFromTitleSelection { dir = 'zettel' }", + ["zc"] = ":'<,'>ZkNewFromContentSelection { dir = 'zettel', title = vim.fn.input('Title: ') }", + ["zf"] = ":'<,'>ZkMatch", + }) end local function buffer()