Hey y’all. Finally migrating my many years old init.vim
to lua so that I can take advantage of some of the new features in neovim. One issue I’ve run into very early on is that a common netrw command Sexplore
is available but the bang version Sexplore!
is not.
when configured like so:
vim.keymap.set("n", "<leader>n", vim.cmd.Sexplore)
vim.keymap.set("n", "<leader>v", vim.cmd.Sexplore{ bang = true })
the Sexplore keymap works but the bang version throws this error on startup:
E5113: Error while calling lua chunk: ~/.config/nvim/lua/remap.lua:7:
Command not found: Sexplore
I’m currently working around the issue via:
vim.keymap.set("n", "<leader>v", ":Sexplore!<CR>")
but I’d love to understand what’s going on here and where I can go to see a full list of available commands. If the issue is that the command is provided by the plugin (and not available on vim.cmd
), then I’m unsure why the non banged version is working.