Add neorg exports shortcuts

This commit is contained in:
Fabrice Mouhartem 2024-03-25 11:29:22 +01:00 committed by Fabrice Mouhartem
parent bef72fd08d
commit f00d49600f
Signed by: fmouhart
GPG Key ID: 2C5033B228CFE4E7

View File

@ -17,6 +17,7 @@ require('which-key').register {
['<leader>n'] = { name = '[N]eorg', _ = 'which_key_ignore' }, ['<leader>n'] = { name = '[N]eorg', _ = 'which_key_ignore' },
['<leader>m'] = { name = 'neorg [M]ode', _ = 'which_key_ignore' }, ['<leader>m'] = { name = 'neorg [M]ode', _ = 'which_key_ignore' },
['<leader>l'] = { name = 'neorg [L]ist', _ = 'which_key_ignore' }, ['<leader>l'] = { name = 'neorg [L]ist', _ = 'which_key_ignore' },
['<leader>ne'] = { name = '[N]eorg [E]xport', _ = 'which_key_ignore' },
} }
vim.api.nvim_set_keymap("n", "<Leader>ni", ":Neorg index<CR>", vim.api.nvim_set_keymap("n", "<Leader>ni", ":Neorg index<CR>",
@ -31,6 +32,12 @@ vim.api.nvim_set_keymap("n", "<Leader>ns", ":Neorg journal tomorrow<CR>",
{ noremap = true, silent = true, desc = "Neorg tomorrow" }) { noremap = true, silent = true, desc = "Neorg tomorrow" })
vim.api.nvim_set_keymap("n", "<Leader>ny", ":Neorg journal yesterday<CR>", vim.api.nvim_set_keymap("n", "<Leader>ny", ":Neorg journal yesterday<CR>",
{ noremap = true, silent = true, desc = "[N]eorg [Y]esterday" }) { noremap = true, silent = true, desc = "[N]eorg [Y]esterday" })
vim.api.nvim_set_keymap("n", "<Leader>neo", ":e /tmp/neorg-export.md<CR>",
{ noremap = true, silent = true, desc = "[N]eorg [E]xport [O]pen" })
vim.api.nvim_set_keymap("n", "<Leader>nee", ":Neorg export to-file /tmp/neorg-export.md<CR>",
{ noremap = true, silent = true, desc = "[N]eorg [E]xport Predefined" })
vim.api.nvim_set_keymap("n", "<Leader>nef", ":Neorg export to-file ",
{ noremap = true, silent = true, desc = "[N]eorg [E]xport [F]ile" })
local neorg = require('neorg') local neorg = require('neorg')