There is a vim plugin that allows even the .vimrc to be composed in lua. But I would prefer python. Does anyone know of such a plugin or version of vim that uses python throughout the internals, allowing even the .vimrc to be composed directly in python? So far my searches have found nothing comparable.

1 Answer 1


You can try reading the Vim :help python help page. There's a lot there to get started.

It's not easy though. Caution...

  • your version of Vim must be recent enough
  • it must have been installed with the python or python3 feature
  • deal with possible ambiguity between python and python3
  • make sure your python has the python vim module included. (the api from Python back to Vim)

Do you really want to do this though?

Neovim is different in that lua is actually part of Neovim. The lua in Neovim is fully ready to use in Vimmy ways. Getting Python to work with Vim may be interesting, but I honestly think that a ~/.vimrc in Vimscript is simpler in the long run.

Using lua for Neovim plugins has clear speed benefits and may be easier to do if you've never learned all the surprising things about Vimscript. Using Python for a .vimrc to replace lines like set number and set tabstop=4 with Python is certainly more complicated than just using Vimscript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.