Skip to content

Commit

Permalink
docs(keybinds): prefer Filetype over BufEnter
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jul 15, 2024
1 parent e00042a commit ccfd33f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ files. There are two ways to combat this:
```
- Create an autocommand using `vim.api.nvim_create_autocmd`:
```lua
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*.norg",
vim.api.nvim_create_autocmd("Filetype", {
pattern = "norg",
callback = function()
vim.keymap.set("n", "my-key-here", "<Plug>(neorg.pivot.list.toggle)", { buffer = true })
end,
Expand Down

0 comments on commit ccfd33f

Please sign in to comment.