simple_bookmarks.vim icon indicating copy to clipboard operation
simple_bookmarks.vim copied to clipboard

getting "Error: not an editor command" when using the plugin commands

Open emilBeBri opened this issue 2 years ago • 3 comments

Hi, when trying to load the plugin I get the error:


E492: Not an editor command

So this is something with loading of the plugin - not sure why though, not having problems with any other plugins (including another vim instead of nvim plugin)

this is the how I load it, inside a lua table with some other plugins as well - using Lazy:

{'andrewradev/simple_bookmarks.vim',  
    -- config = function()
    -- require('simple_bookmarks.vim').setup {
    -- }
    -- end
    }, 

Lazy have installed the plugin, so it's the loading that's not happening, as the error also alludes to. I'm fearing this is a simple question my me still learning nvim and lua, something I'm not getting here? Tried a couple of things like loading it like this as well:

vim.cmd[[
lua require'simple_bookmarks.vim'.setup {}
]]

but that's not working either.

emilBeBri avatar Apr 01 '23 15:04 emilBeBri

I don't know how much I can help here, since I don't use neovim, but it seems to me like require'simple_bookmarks.vim'.setup {} can't work -- there's no lua file to evaluate. How do you set up your other Vim plugins that work? I see this in the lazy.nvim documentation:

{
    "dstein64/vim-startuptime",
    -- lazy-load on a command
    cmd = "StartupTime",
    -- init is called during startup. Configuration for vim plugins typically should be set in an init function
    init = function()
      vim.g.startuptime_tries = 10
    end,
  },

You don't need commands or init, so it seems to me like { "AndrewRadev/simple_bookmarks.vim" } should just work with no config.

Actually, I just realized that you haven't written which command you're running that blows up. Because of a feature request, I recently changed the commands to all start with :Bookmark for consistency. Is it possible you've updated, but you're calling the previous command names?

AndrewRadev avatar Apr 01 '23 18:04 AndrewRadev

Hmm well I use the commands that start with Bookmark, from the README:

nnoremap <leader>ba :BookmarkAdd<space>
nnoremap <leader>bg :BookmarkGo<space>
nnoremap <leader>bd :BookmarkDel<space>
nnoremap <leader>bq :BookmarkQf<cr>

those are the right ones, aren’t they?

Allright - I’ll ask on the neovim subreddit and see, if there is something about loading vim plugins I have missed, I'll post it here.

emilBeBri avatar Apr 02 '23 08:04 emilBeBri

Those are the right commands, yes, so it shouldn't be the problem. It might be a good idea to open a github issue to request instructions for vimscript plugins if there are any special ones.

AndrewRadev avatar Apr 02 '23 09:04 AndrewRadev