ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHP Completions Kit

by gerardroche ALL

PHP completions for Sublime Text.

Details

Installs

  • Total 103K
  • Win 66K
  • Mac 17K
  • Linux 20K
Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12
Windows 0 5 5 5 6 4 5 4 4 6 7 5 1 2 1 8 5 5 3 5 1 2 7 11 4 6 3 5 3 6 3 8 5 3 3 8 4 4 9 5 4 3 1 5 6 4
Mac 0 0 2 0 1 0 0 0 1 2 1 4 0 2 0 2 1 1 2 0 1 2 2 1 0 0 0 3 0 0 0 0 2 0 1 1 1 1 2 1 0 0 2 0 0 4
Linux 0 0 1 1 1 2 0 1 0 0 2 2 0 1 6 2 8 1 1 0 0 4 2 2 5 3 2 1 0 0 1 2 3 4 0 3 0 2 1 1 0 1 4 1 0 2

Readme

Source
raw.​githubusercontent.​com

WHAT PHP COMPLETIONS KIT IS

Minimum Sublime Version Latest Version GitHub stars Downloads

Provides PHP completions for Sublime Text.

FEATURES

  • PHP ~7
  • Scoped to minimise auto-complete noise
  • Language constructs
  • Magic constants
  • Magic methods
  • Constants
  • Functions
  • Type hints: Classes, Interfaces, Exceptions, Instantiables, etc.
  • Supported extensions: bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend, OPcache, zip, zlib.
  • PSR compatible

INSTALLATION

Package Control installation

The preferred method of installation is Package Control.

Manual installation

Close Sublime Text, then download or clone this repository to a directory named PHP Completions Kit in the Sublime Text Packages directory for your platform:

  • Linux: git clone https://github.com/gerardroche/sublime-phpck.git ~/.config/sublime-text-3/Packages/PHP Completions Kit
  • OSX: git clone https://github.com/gerardroche/sublime-phpck.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/PHP Completions Kit
  • Windows: git clone https://github.com/gerardroche/sublime-phpck.git %APPDATA%\Sublime/ Text/ 3/Packages/PHP Completions Kit

USAGE

By default, completions are triggered automatically when typing. If the setting auto_complete is set to false then completions must be manually triggered.

Completions are context aware, meaning they are only provided in relevant contexts e.g. type hints will trigger at class Name extends |, function(|, /* @var | */, exception trigger at try {} catch(|, interfaces at class name implements |, instantiables new |, etc.

Relating Sublime Text key bindings:

OS X Windows Linux Description
Ctrl+Space Ctrl+Space Alt+/ Activate completions

Relating Sublime Text settings:

{
    // By default, auto complete will commit the current completion on enter.
    // This setting can be used to make it complete on tab instead.
    // Completing on tab is generally a superior option, as it removes
    // ambiguity between committing the completion and inserting a newline.
    "auto_complete_commit_on_tab": false,

    // Controls if auto complete is shown when snippet fields are active.
    // Only relevant if auto_complete_commit_on_tab is true.
    "auto_complete_with_fields": false,
}

Set them globally: Menu → Preferences → Settings:

{
    "auto_complete_commit_on_tab": true,
    "auto_complete_with_fields": true
}

Set them per-project: Menu → Project → Edit Project:

{
    "settings": {
        "auto_complete_commit_on_tab": true,
        "auto_complete_with_fields": true
    }
}

CHANGELOG

See CHANGELOG.md.

LICENSE

Released under the BSD 3-Clause License.