Skip to content

Commit

Permalink
zk: define folder structure in zk new mappings
Browse files Browse the repository at this point in the history
Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Nov 18, 2024
1 parent 6fb87e4 commit 5082436
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@ end

local function zettelkasten()
keymaps.register({ "n" }, {
["<leader>zn"] = "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>",
["<leader>zn"] = "<Cmd>ZkNew { title = vim.fn.input('Title: '), dir = 'zettel' }<CR>",
["<leader>zd"] = "<Cmd>ZkNew { group = 'daily', dir = 'dailies' }<CR>",
["<leader>zo"] = "<Cmd>ZkNotes { sort = { 'modified' } }<CR>",
["<leader>zt"] = "<Cmd>ZkTags<CR>",
["<leader>zf"] = "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
})

keymaps.register({ "n" }, {
["<leader>zn"] = ":'<,'>ZkNewFromTitleSelection { dir = 'zettel' }<CR>",
["<leader>zc"] = ":'<,'>ZkNewFromContentSelection { dir = 'zettel', title = vim.fn.input('Title: ') }<CR>",
["<leader>zf"] = ":'<,'>ZkMatch<CR>",
})
end

local function buffer()
Expand Down

0 comments on commit 5082436

Please sign in to comment.