CodeComplice
CodeIntel for Sublime Text 2 / 3
Details
Installs
- Total 17K
- Win 9K
- Mac 5K
- Linux 4K
Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 10 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 2 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 |
Linux | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
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:
- Jump to Symbol Definition - Jump to the file and line of the definition of a symbol.
- Imports autocomplete - Shows autocomplete with the available modules/symbols in real time.
- Function Call tooltips - Displays information in the status bar about the working function.
Plugin should work in all three platforms (MacOS X, Windows and Linux).
Installing
with Sublime Package Control
- Open command pallet (default:
ctrl+shift+p
) - Type
package control install
and select commandPackage Control: Install Package
- 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
- 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:
* Jump to definition = Control+Click
* Jump to definition = Control+Command+Alt+Up
* Go back = Control+Command+Alt+Left
* Manual Code Intelligence = Control+Shift+space
For Linux:
* Jump to definition = Super+Click
* Jump to definition = Control+Super+Alt+Up
* Go back = Control+Super+Alt+Left
* Manual Code Intelligence = Control+Shift+space
For Windows:
* Jump to definition = Alt+Click
* Jump to definition = Control+Windows+Alt+Up
* Go back = Control+Windows+Alt+Left
* Manual Code Intelligence = 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!
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:
- Information for all possible settings is available in the
CodeComplice.sublime-settings
file in the package.
Troubleshooting
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 containscodeintel.log
,VERSION
and the directorydb
. 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!
What's New
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
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.