Python AutoComplete with Buildout Support for Sublime Text

Are there any tricks on how to make Sublime Text Python self-grab aware of all the eggs from the buildout [eggs] section

eg. take the same sys.path as in the Plone command generated by the command bin/instanceand set them to Sublime auto-completion. You can easily autofill imports and more after that.

The preferred solution would be

  • Have a special bin/sublimebuildout generated command

  • This command will open the folder src/as Sublime text (project?) With all the necessary environment variables and data set

Other solutions / ideas are welcome.

+5
source share
4 answers

http://pypi.python.org/pypi/corneti.recipes.codeintel/0.1.3

, , development.cfg

[codeintel]
recipe = corneti.recipes.codeintel
eggs = ${buildout:eggs}
extra-paths =
    ${omelette:location}
+6

, SublimeRope, - .ropeproject/config.py:

import os
import glob
for path in glob.glob(os.path.join(os.path.dirname(__file__), '../../buildout-cache/eggs/*.egg')):
    prefs.add('python_path', path)

, !

+1

plone.recipe.sublimetext, SublimeText 3 SublimeJEDI, SublimeLinter (flake8, pylint).

This recipe will create a specific elevated project file containing all possible paths (i.e. the whole path of the egg for the Jedi). A simple use case could be

[buildout]
eggs =
# All eggs here
parts = 
    sublimetext
#   other parts here
[sublimetext]
recipe = plone.recipe.sublimetext
eggs = ${buildout:eggs}
jedi-enabled = True
sublimelinter-enabled = True
sublimelinter-flake8-enabled = True
+1
source

All Articles