Skip to content

Default mapping gO to :Neorg toc removed? #1570

Answered by DragoonSakura
Anrock asked this question in Q&A
Discussion options

You must be logged in to vote

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!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Anrock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants