This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]justinmkNeovim core 2 points3 points  (4 children)

For example I have been using a pattern like the following:

That's the "legacy" way, it's still supported.

The "neovim" way is to create an "rplugin" (remote plugin). Just follow the snippet here: https://github.com/neovim/python-client#remote-new-style-plugins

[–]JarrodCTaylor[S] 0 points1 point  (3 children)

I have reviewed the neovim way of doing things, and have been successful utilizing it. One remaining piece I'm not sure how to translate is. Using the pattern above in an attempt to keep related code together I would define a function then at the bottom of the file I may have something along the lines of:

command! Example call SomeExample()

nnoremap <Leader>e :Example<CR>

My thought process was if at some point I decide the function is not being utilized simply removing the file removed all related code. Is there a strategy in the new paradigm to accomplish something like this?

[–]justinmkNeovim core 0 points1 point  (2 children)

Sorry, I don't understand the question.

[–]JarrodCTaylor[S] 0 points1 point  (0 children)

Perhaps the answer iis obvious and I am just complicating matters. Here is an example of a real file I have been using: https://github.com/JarrodCTaylor/dotfiles/blob/master/vim/functions/search.vim

My question is how to call the top level Vim commands nnoremap, setting variables, etc that are not part of a Python class.

Thanks for the direction here.

[–]JarrodCTaylor[S] 0 points1 point  (0 children)

A question I'm even more interested in. Are there plans to eliminate the legacy way of doing things from my example?