这是indexloc提供的服务,不要输入任何密码
Skip to content

Wrong documentation #205

@SebasF1349

Description

@SebasF1349

I can be totally wrong of course, but in the documentation these keymaps are presented (https://github.com/danymat/neogen?tab=readme-ov-file#default-cycling-support)

local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("i", "<C-l>", ":lua require('neogen').jump_next<CR>", opts)
vim.api.nvim_set_keymap("i", "<C-h>", ":lua require('neogen').jump_prev<CR>", opts)

Aren't they wrong and should be instead

local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("i", "<C-l>", "<cmd>lua require('neogen').jump_next()<CR>", opts)
vim.api.nvim_set_keymap("i", "<C-h>", "<cmd>lua require('neogen').jump_prev()<CR>", opts)

Note the change of : with <cmd> (to avoid just writing it in insert mode) and the missing brackets at the end of the functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions