2

I seem to have to run RopeGenerateAutoimportCache every time I open my python project in vim before RopeAutoImport will work. If I run RopeAutoImport before caching the projects modules I get the following error:

Global name my_func not found!

Is there a way of either generating the cache on each vim startup, or preferably, saving the cache to be reread on startup?

Blaszard
  • 30,954
  • 51
  • 153
  • 233
Brendan Maguire
  • 4,188
  • 4
  • 24
  • 28
  • As a preliminary solution, you could add the line `RopeGenerateAutoimportCache` to the bottom of the file `~/.vimrc`. This will run that command once every time you start up Vim with `vim`. Though the command will also run when you edit non-Python projects with Vim, and that might cause errors. – Rory O'Kane Oct 13 '14 at 08:31
  • 1
    Cheers Rory. I went back to python-mode and found a problem in the code for which, at the time writing this, I have a patch to be merged: https://github.com/klen/python-mode/pull/488 I am no longer seeing this problem with the patched code. – Brendan Maguire Oct 13 '14 at 08:57
  • 1
    You should add your comment as a self-answer, so people know the question has been answered, and can easily read your answer if they find this question later. – Rory O'Kane Oct 13 '14 at 09:09

1 Answers1

0

I went back to python-mode (which is the suggested plugin for python) and found a problem in the code for which, at the time writing this, I have a patch to be merged: github.com/klen/python-mode/pull/488

I am no longer seeing this problem with the patched code.

Brendan Maguire
  • 4,188
  • 4
  • 24
  • 28