GithubHelp home page GithubHelp logo

sublimejedi's Introduction

SublimeJEDI

SublimeJEDI is a Sublime Text 2 and Sublime Text 3 plugin to the awesome autocomplete library Jedi

Installation

with Git

cd ~/.config/sublime-text-2/Packages/
git clone https://github.com/srusskih/SublimeJEDI.git

with Sublime Package Control

  1. Open command pallet (default: ctrl+shift+p)
  2. Type package control install and select command Package Control: Install Package
  3. Type jedi and select "SublimeJEDI"

Additonal info installations you can find here http://wbond.net/sublime_packages/package_control/usage

Settings

Python interpreter settings

By default SublimeJEDI will use default Python interpreter from the PATH. Also you can set different interpreter for each Sublime Project.

To set project related Python interpreter you have to edit yours project config file. By default project config name is <project name>.sublime-project

You can set Python interpreter, and additional python package directories, using following:

# <project name>.sublime-project
{
    // ...

    "settings": {
        // ...
        "python_interpreter_path": "/home/sr/.virtualenvs/django1.5/bin/python"

        "python_package_paths": [
            "/home/sr/python_packages1",
            "/home/sr/python_packages2",
            "/home/sr/python_packages3"
            ]
    }
}

Autocomplete on DOT

If you want auto-completion on dot, you can define a trigger in the Sublime User or Python preferences:

# User/Preferences.sublime-settings or User/Python.sublime-settings
{
    // ...
    "auto_complete_triggers": [{"selector": "source.python", "characters": "."}],
}

If you want auto-completion ONLY on dot and not while typing, you can set (additionally to the trigger above):

# User/Preferences.sublime-settings or User/Python.sublime-settings
{
    // ...
    "auto_complete_selector": "-",
}

Function args fill up on completion

SublimeJEDI allow fill up function parameters by default. Thanks to @krya, now you can turn it off. Function parameters completion has 3 different behavior:

  • insert all function arguments on autocomplete (default behavior)

    # complete result
    func(a, b, c, d=True, e=1, f=None)        
    
    # sublime_jedi.sublime-settins
    {
        "auto_complete_function_params": "all"
    }	
    
  • insert arguments that don't have default value (e.g. required)

    # complete result
    func(a, b, c)
    
    # sublime_jedi.sublime-settins
    {
        "auto_complete_function_params": "required"
    }
    
  • do not insert any arguments

    # complete result
    func()
    
    # sublime_jedi.sublime-settins
    {
        "auto_complete_function_params": ""
    }
    

Jedi Goto / Go Definition

Find function / variable / class definition

Shortcuts: CTRL+SHIFT+G or CTRL + LeftMouseButton

Jedi Find Related Names ("Find Usages")

Find function / method / variable / class usage, definition

Shortcut: Alt+Shift+f

License

GNU LGPL v3 full text

sublimejedi's People

Contributors

astrac avatar aukaost avatar hickford avatar krya avatar quarnster avatar schlamar avatar srusskih avatar svaiter avatar vishen avatar wuub avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.