From 6254bfe4d06413a6cb3a39a5fce4fc28ec300c87 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sun, 24 Dec 2023 22:40:34 +0100 Subject: [PATCH] markdown: mail bindings + formatoptions for convenience MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - emails in markdown: https://blog.epheme.re/tips/vim-md-emails.html --- lua/autocommands.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/autocommands.lua b/lua/autocommands.lua index 8378b50..65ff3f8 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -5,6 +5,10 @@ vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { vim.o.filetype = 'pandoc' vim.o.spell = true vim.o.spelllang = 'en' + 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 }) + vim.keymap.set('', 'my', ':w !pandoc -f markdown+emoji --wrap=none -t html5 | wl-copy', { noremap = true, silent = true }) end })