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).
ctrl+shift+p
)package control install
and select command Package Control: Install Package
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:
Sublime Text -> Preferences -> Browse Packages...
Preferences -> Browse Packages...
Preferences -> Browse Packages...
Start typing code as usual, autocomplete will pop up whenever it's available. CodeComplice will also allow you to jump around symbol definitions even across files with just a click ..and back.
For Mac OS X:
Control+Click
Control+Command+Alt+Up
Control+Command+Alt+Left
Control+Shift+space
For Linux:
Super+Click
Control+Super+Alt+Up
Control+Super+Alt+Left
Control+Shift+space
For Windows:
Alt+Click
Control+Windows+Alt+Up
Control+Windows+Alt+Left
Control+Shift+space
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!
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:
CodeComplice.sublime-settings
file in the package.To force re-indexation of the code intelligence database you need to follow these steps:
Close Sublime Text
Open a terminal or navigate through your directories to find the database directory (default:~/.codeintel
) that contains codeintel.log
, VERSION
and the directory db
. In Windows, this should be at %userprofile%\.codeintel
.
Delete the whole directory and all of its content.
Start Sublime Text and enjoy a clean re-indexing!
v1.1.2 (2015-03-09):
fix Ruby support and Rails catalog
improve working with very large buffers (>10000 lines)
PHP: fix goto_defn of extended class, if interface is also implemented
JS: improve jQuery catalog with Deferred, Promise and jqXHR objects
v1.1.1 (2015-02-18):
zipping stdlibs, reducing plugin size by 2/3.
JavaScript: adjust minimal trigger length from 4 to 3 chars.
remove extensive JavaScript info logging -> speedup
separate trigger_types in JavaScript -> speedup
fix doublettes in JavaScript calltips
v1.1.0 (2015-02-15):
added support for golang. ported from komodo-go
avoid unnecessary trigger evaluation this will be a appreciable speedup on older systems
v1.0.6 (2015-02-11):
this is now working
Python Trigger complete-local-symbols (the full way, not the SublimeCodeIntel way!)
usability tweaks
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.