Feat(nvim): zk new note shortcuts

This commit is contained in:
Bertrand Benjamin 2023-02-21 10:16:05 +01:00
parent bcc2772268
commit 1d5e596ce0

View File

@ -25,9 +25,12 @@ zk.setup({
local opts = { noremap=true, silent=false } local opts = { noremap=true, silent=false }
-- Create a new note after asking for its title. -- Create a new note after asking for its title.
vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts) vim.api.nvim_set_keymap("n", "<leader>zs", "<Cmd>ZkNew { title = vim.fn.input('Title (slipbox): '), dir = 'slipbox'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>za", "<Cmd>ZkNew { title = vim.fn.input('Title: '), dir = 'atoms'}<CR>", opts) vim.api.nvim_set_keymap("v", "<leader>zs", ":'<,'>ZkNewFromTitleSelection { dir = 'slipbox'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zm", "<Cmd>ZkNew { title = vim.fn.input('Title: '), dir = 'molecules'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zi", "<Cmd>ZkNew { title = vim.fn.input('Title (inbox): '), dir = 'inbox'}<CR>", opts)
vim.api.nvim_set_keymap("v", "<leader>zi", ":'<,'>ZkNewFromTitleSelection { dir = 'inbox'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zh", "<Cmd>ZkNew { title = vim.fn.input('Title (hubs): '), dir = 'hubs'}<CR>", opts)
-- Open notes. -- Open notes.
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts) vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)