markdown: mail bindings + formatoptions for convenience

- emails in markdown: https://blog.epheme.re/tips/vim-md-emails.html
This commit is contained in:
Fabrice Mouhartem 2023-12-24 22:40:34 +01:00
parent 9edbeeaae4
commit 6254bfe4d0

View File

@ -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('', '<LocalLeader>msy', ':w !pandoc -f markdown+emoji -t html5 -s | wl-copy<CR><CR>', { noremap = true, silent = true })
vim.keymap.set('', '<LocalLeader>my', ':w !pandoc -f markdown+emoji --wrap=none -t html5 | wl-copy<CR><CR>', { noremap = true, silent = true })
end
})