From 4edd7015ca78c128f05df74ea026ed370a55e04b Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sun, 3 Mar 2024 10:32:24 +0100 Subject: [PATCH] Add markdown preview shortcut + description to other bindings --- lua/autocommands.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/autocommands.lua b/lua/autocommands.lua index 8e0da3a..8ea447a 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -14,9 +14,10 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { vim.o.formatoptions = "qj" -- email commands: my/msy to paste the html inside the clipboard vim.keymap.set('', 'msy', ':w !pandoc -f markdown+emoji -t html5 -s | wl-copy', - { noremap = true, silent = true }) + { noremap = true, silent = true, desc = "[M]arkdown to [S]ingle page [Y]ank" }) vim.keymap.set('', 'my', ':w !pandoc -f markdown+emoji --wrap=none -t html5 | wl-copy', - { noremap = true, silent = true }) + { noremap = true, silent = true, desc = "[M]arkdown to HTML [Y]ank" }) + vim.keymap.set('', 'mp', 'MarkdownPreviewToggle', { noremap = true, silent = true, desc = "[M]arkdown [Preview]" }) end })