nvim: Add existing zettel link insertion mappings

Added mapping to insert a link to an existing Zettel with
`<localleader>ni` (note insert), either from normal mode which creates
the complete link, or from visual selection mode which surrounds the
current selection (as visible link text) with the link.

New zettel links still use my own implementation so I have full control
over their naming scheme.
This commit is contained in:
Marty Oehme 2024-02-05 15:42:59 +01:00
parent 22b70a0639
commit 8512bbf2cf
Signed by: Marty
GPG Key ID: EDBF2ED917B2EF6A
1 changed files with 13 additions and 0 deletions

View File

@ -130,6 +130,19 @@ local prose_plugs = {
end,
desc = "index page",
},
{
"<localleader>ni",
function()
require("zk.commands").get("ZkInsertLink")()
end,
desc = "insert link",
},
{
"<localleader>ni",
":'<,'>ZkInsertLinkAtSelection<cr>",
mode = "v",
desc = "insert link",
},
},
},