Skip to content

Commit

Permalink
chore(keybinds): improve wording for wiki page
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jul 13, 2024
1 parent 909776f commit bfbe7b9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ By default when you load the `core.keybinds` module all keybinds will be enabled
### Remapping Keys
To understand how to effectively remap keys, one must understand how keybinds are set.
Neorg binds keys to various `<Plug>` mappings bound to `<Plug>(neorg...`.
Neorg binds actions to various `<Plug>` mappings that look like so: `<Plug>(neorg...`.
To remap a key, simply map it somewhere in your configuration:
To remap a key, simply map an action somewhere in your configuration:
```lua
vim.keymap.set("n", "my-key-here", "<Plug>(neorg.pivot.list.toggle)", {})
```
Neorg will recognize that the key has been bound by you and not bind its own key.
#### Binding Keys for Norg Files Only
This approach has a downside - all of Neorg's keybinds are set on a per-buffer basis
so that keybinds don't "overflow" into buffers you don't want them active in.
Expand All @@ -54,6 +56,10 @@ files. There are two ways to combat this:
Notice that in both situations a `{ buffer = true }` was supplied to the function.
This way, your remapped keys will never interfere with other files.
### Discovering Keys
A comprehensive list of all keybinds can be found on [this page!](https://github.com/nvim-neorg/neorg/wiki/Default-Keybinds)
--]]

local neorg = require("neorg.core")
Expand Down

0 comments on commit bfbe7b9

Please sign in to comment.