Home

Awesome

CodeComplice

This Project started as a fork of the SublimeCodeIntel plugin. I invested months of work to improve and refine the plugin and I intend to keep on doing so! If you're coming from the original SublimeCodeIntel, take a close look at the Configuring section below!


Based on the open-source Code intelligence from Open Komodo Editor.

Supported languages for Code Intelligence (CIX, CodeIntel2):

Go
Python
Python3
Django
PHP
Perl
Ruby
JavaScript (Node.js basics)
CSS, SCSS, Sass

other languages ported from Komodo but not revised:

HTML, HTML5, Mason, RHTML, Smarty, Tcl, TemplateToolkit, Twig, XBL, XML, XSLT, XUL

Provides the following features:

Plugin should work in all three platforms (MacOS X, Windows and Linux).

Installing

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 complice and select "CodeComplice"

Without Git: Download the latest source from GitHub and copy the whole directory into the Packages directory.

With Git: Clone the repository in your Sublime Text Packages directory, located somewhere in user's "Home" directory::

git clone git://github.com/spectacles/CodeComplice.git

The "Packages" packages directory is located differently in different platforms. To access the directory use:

OS X:
Sublime Text -> Preferences -> Browse Packages...
Linux:
Preferences -> Browse Packages...
Windows:
Preferences -> Browse Packages...

Using

Don't despair! The first time you use it it needs to build some indexes and it can take more than a few seconds.

It just works!

Configuring

Basic settings can be configured in the User File Settings.

All settings can be overridden in the *.sublime-project file under the value "codeintel_settings". For Example::

{
    "codeintel_settings":
    {
        "codeintel_database_dir": "~/.codeintel/databases/myProject",
        "codeintel_language_settings":
        {
            "JavaScript": {
                "codeintel_scan_files_in_project": true,
                "codeintel_scan_exclude_dir": ["/min/"]
            }
        }
    }
}

If you put this in your *.sublime-project file, the codeintel-machine will use the given directory as its database, scan the project folders for JavaScript source files but exclude paths that somehow match with the regular expression "/min/"

To define settings specifically for a language, use the "codeintel_language_settings" setting. Example::

{
    "codeintel_settings":
    {
        "codeintel_language_settings":
        {
            "PHP": {
                "php": '/usr/bin/php',
                "phpConfigFile": 'php.ini',
                "codeintel_live": true
            },
            "Perl": {
                "perl": "/usr/bin/perl",
                "codeintel_tooltips": "popup"
            },
            "Ruby": {
                "ruby": "/usr/bin/ruby",
                "codeintel_word_completions": "buffer"
            },
            "Python": {
                "python": '/usr/bin/python',
                "codeintel_scan_extra_dir": ["dir/one", "dir/two"]
            },
            "Python3": {
                "python3": '/usr/bin/python3',
                "codeintel_selected_catalogs": ["PyWin32"]
            }
        }
    }
}

This is an extreme example, but should give you an impression of the flexibility of the language settings.

For adding additional library paths (django and extra libs paths for Python or extra paths to look for .js files for JavaScript for example), either add those paths as folders to your project, use the "codeintel_scan_extra_dir" setting. It is recommended to configure this setting on a "per-language" basis, as a great number of import dirs will slow down the autocompletion process.

Do NOT edit the default CodeComplice settings. Your changes will be lost when CodeComplice is updated. ALWAYS edit the user CodeComplice settings by selecting "Preferences->Package Settings->CodeComplice->Settings - User". Note that individual settings you include in your user settings will completely replace the corresponding default setting, so you must provide that setting in its entirety.

Available settings:

Troubleshooting

To force re-indexation of the code intelligence database you need to follow these steps:

What's New

v1.1.2 (2015-03-09):

v1.1.1 (2015-02-18):

v1.1.0 (2015-02-15):

v1.0.6 (2015-02-11):

License

The plugin is based in code from the Open Komodo Editor and has a MPL license.

Ported from Open Komodo by German M. Bravo (Kronuz).

Uses CSS from Intellitip under the MIT License.