Sublime Text 2 :: Python code completion

17,782

Sublime's autocomplete is intended to match within the current file.

If you want to have code completion based on syntactic features of the language, you have many options, but I would suggest some combination of the following:

Hope that helps.

Share:
17,782
NYCeyes
Author by

NYCeyes

RESUME/CV: https://jupyter.ai Work Areas: Both director and hands-on implement data processing, data analytics and backend services in Python-3, Spark 2.0, Kafka, NoSQL genres, Microservices, and related glue technologies. AMAZON WEB SERVICES (AWS) • LINUX / LXC CONTAINERS • DOCKER • PYTHON 3 • UNIX BASH & CLI AWS-based HYBRID DATACENTER ARCHITECTURES • AWS-based DATACENTER MIGRATIONS AWS-based BUSINESS CONTINUITY & DISASTER RECOVERY (BC/DR) • CLOUDERA CDH and HADOOP ECOSYSTEM AWS-based REALTIME STREAM COMPLEX EVENT PROCESSORS (C.E.P.) • E.T.L. • NoSQL DATABASES LONG DISTANCE MULTI-SITE FIBRE-CHANNEL SAN ARCHITECTURES FOR BC/DR AWS TOOLS (abbrev): SQS | ECS | SNS | DYNAMODB | ELASTICACHE | EC2 | VPC | KINESIS | DIRECT CONNECT | (Etc). OPEN SOURCE TOOLS (abbrev): MONGODB | C* | REDIS | STORM | KAFKA | SPARK | SCIKIT-LEARN | TENSORFLOW | (Etc).

Updated on June 13, 2022

Comments

  • NYCeyes
    NYCeyes almost 2 years

    I'm trying to get Code suggestion (the drop-down box) to suggest properly.

    Right now it does not. It only suggests, more or less, identifiers and modules that are already in the file being edited (meaning in-file scope). If, for example, I try this:

    import numpy <--- numpy is not suggested as I type it.

    numpy.a <--- And here, nothing that begins with 'a' is suggested.

    I've implemented a raft of things suggested at various sites, including the following, but with no success in getting correct code-complete suggestions to appear, or sometimes to appear at all:

    - Installed SublimeRope
    - "use_simple_completion": true  (in SublimeRope.sublime-settings)
    - "auto_complete_triggers": [ {"selector": "source.python - string - comment - constant.numeroc", "characters": "."} ]  (in Pyhon.sublime-settings)
    - etc.
    

    Am I missing something (of course I am :)). Appreciate the suggestions.

  • NYCeyes
    NYCeyes about 11 years
    Thank you. It does. I actually had tried CodeIntel which is what got me closer to what I wanted, though it still struggles to auto-suggest correctly (and it's slows things down -- like any plugin naturally would -- some more that others). Your comment let me know I was going in the right direction (with the myriad of settings that there are). I'd upvote your response (because it's correct), but I only have a measly 6 points. :)
  • NL23codes
    NL23codes about 4 years
    Just a heads up for others, the setup for CodeIntel is very difficult and the documentation is very poor.