mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
yank notelink
This commit is contained in:
@@ -193,6 +193,19 @@ FollowLink = function(opts)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- YankLink:
|
||||
-- -----------
|
||||
--
|
||||
-- Create and yank a [[link]] from the current note.
|
||||
--
|
||||
YankLink = function()
|
||||
local title = '[[' .. path_to_linkname(vim.fn.expand('%')) .. ']]'
|
||||
vim.fn.setreg('"', title)
|
||||
print('yanked ' .. title)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- GotoToday:
|
||||
-- ----------
|
||||
@@ -335,6 +348,7 @@ local M = {
|
||||
new_note = CreateNote,
|
||||
goto_thisweek = GotoThisWeek,
|
||||
find_weekly_notes = FindWeeklyNotes,
|
||||
yank_notelink = YankLink,
|
||||
}
|
||||
return M
|
||||
|
||||
|
||||
Reference in New Issue
Block a user