Coder Social home page Coder Social logo

sublimecodeintel's Introduction

SublimeCodeIntel

Code intelligence plugin ported from Open Komodo Editor to Sublime Text 2.

Supports all the languages Komodo Editor supports for Code Intelligence (CIX, CodeIntel2):

PHP, Python, RHTML, JavaScript, Smarty, Mason, Node.js, XBL, Tcl, HTML, HTML5, TemplateToolkit, XUL, Django, Perl, Ruby, Python3.

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).

Click here to lend your support to SublimeCodeIntel and make a donation at pledgie.com!

Installing

With the Package Control plugin: The easiest way to install SublimeCodeIntel is through Package Control, which can be found at this site: http://wbond.net/sublime_packages/package_control

Once you install Package Control, restart ST2 and bring up the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows). Select "Package Control: Install Package", wait while Package Control fetches the latest package list, then select SublimeCodeIntel when the list appears. The advantage of using this method is that Package Control will automatically keep SublimeCodeIntel up to date with the latest version.

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 2 Packages directory, located somewhere in user's "Home" directory:

git clone git://github.com/Kronuz/SublimeCodeIntel.git

The "Packages" packages directory is located at:

  • OS X:

    ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
  • Linux:

    ~/.Sublime\ Text\ 2/Packages/
  • Windows:

    %APPDATA%/Sublime Text 2/Packages/

Using

  • Sublime CodeIntel will allow you to jump around symbol definitions even across files with just a click. To "Jump to Symbol Declaration" use super+f3 or alt+click over the symbol. To go back to previous jump point use cmd+alt+ctrl+left.
  • Start typing code as usual, autocomplete will pop up whenever it's available. To trigger manual codeintel autocompletion use shift+ctrl+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 (around six in my configuration).

It just works!

If you find the behaviour somewhat unexpected or the autocomplete incomplete, please reset the plugin from sublimetext command palette before trying anything else.

Configuring

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, or create an optional codeintel configuration file in your home or in your project's root.

Configuration files (~/.codeintel/config or project_root/.codeintel/config). All configurations are optional. Example:

{
    "PHP": {
        "php": '/usr/bin/php',
        "phpExtraPaths": [],
        "phpConfigFile": 'php.ini'
    },
    "JavaScript": {
        "javascriptExtraPaths": []
    },
    "Perl": {
        "perl": "/usr/bin/perl",
        "perlExtraPaths": []
    },
    "Ruby": {
        "ruby": "/usr/bin/ruby",
        "rubyExtraPaths": []
    },
    "Python": {
        "python": '/usr/bin/python',
        "pythonExtraPaths": []
    },
    "Python3": {
        "python": '/usr/bin/python3',
        "pythonExtraPaths": []
    }
}

Additional settings can be configured in the User File Settings:

  • A list of disabled languages can be set using "codeintel_disabled_languages". Ex. "codeintel_disabled_languages": ['css']
  • Live autocomplete can be disabled by setting "codeintel_live" to false.
  • Live autocompletion can be disabled in a per-language basis, using "codeintel_live_disabled_languages". Ex. "codeintel_live_disabled_languages": ['css']
  • Information for more settings is available in the Base File.sublime-settings file.

Troubleshooting

Using build.sh

If everything else fails, try rebuilding the libraries using build.sh. You need to install some things to make sure it's going to work. These are likely to be packaged on your system, such as, for Ubuntu/Debian-like distros. Open a terminal and do:

$ sudo apt-get install g++

$ sudo apt-get install python-dev

Once you have installed those, you may need to use the build.sh script. In your terminal, go to your Packages/SublimeCodeIntel/src folder, then simply run:

$ ./build.sh

What's New

v1.3 (20-12-2011):

  • This build should fix many of the problems seen in Linux systems.
  • Libraries for Linux rebuilt with libpcre statically (libpcre bundled for Linux builds).
  • calltip() is now thread safe (which caused some strange behavior in Linux where Sublime Text 2 ended up being unresponsive).

v1.2 (18-12-2011):

  • JavaScript support improved (it's now much nicer with the CPU).
  • CSS files support much improved (thanks to Jon's new features in autocomplete).
  • Added palette commands to disable/enable the plugin in many ways.
  • Added codeintel_live_disabled_languages and fixed codeintel_live to disable SublimeCodeIntel live autocomplete mode.
  • Smarter language detection and fallbacks.
  • Improved autocomplete triggering, should now respond better.
  • Support for new completion settings in Sublime Text 2 Build 2148.

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).

sublimecodeintel's People

Contributors

kronuz avatar douglas avatar daris avatar krya avatar brunobord avatar julianeberius avatar optilude avatar elsassph avatar wbond avatar silent1mezzo avatar masterkain avatar singingwolfboy avatar ghedsouza avatar frietz avatar iurisilvio avatar maciej-filip-sz avatar mmorearty avatar akashagrawal03 avatar dsrw avatar jamuspsi avatar lepht avatar

Watchers

Chima Atufunwa 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.