Default mapping gO
to :Neorg toc
removed?
#1570
-
Some time ago pressing I vaguely remember seeing patches reworking ToC and I suspect that keymapping got lost somewhere there. Was that intentional change or a bug? If it was intentional - what is the recommended lua way to bind |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Assuming you are using lua. All file specific configs go inside ftplugin. All configs here only applies to norg files. Extra Note: It is also recommended that you use Good luck! |
Beta Was this translation helpful? Give feedback.
Assuming you are using lua.
Go to your nvim config directory (Usually
~/.config/nvim
in linux)create directory (
~/.config/nvim/ftplugin
).All file specific configs go inside ftplugin.
We first create a file for the desired filetype.
so create file
~/.config/nvim/ftplugtin/norg.lua
(so norg.lua for norg files).All configs here only applies to norg files.
Add:
vim.keymap.set( "n", "gO", "<cmd>Neorg toc<cr>", { desc = "Neorg table of contents" })
.Extra Note: It is also recommended that you use
<localleader>
instead of<leader>
in these filetype specific configs!Good luck!