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

PHP Completions Kit

by gerardroche ST2/ST3

PHP completions for Sublime Text.

Details

Installs

  • Total 69K
  • Win 41K
  • OS X 13K
  • Linux 15K
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 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11
Windows 21 31 14 20 29 33 40 30 24 16 29 30 22 31 27 25 16 19 15 24 24 28 20 16 21 27 28 20 20 23 15 23 31 20 20 30 22 23 15 20 25 21 24 20 15 16
OS X 4 6 3 6 2 4 4 4 5 4 6 4 8 4 5 6 4 3 6 5 1 6 5 4 6 5 6 2 2 4 5 6 4 4 10 7 4 0 3 7 5 5 3 3 3 2
Linux 6 9 4 5 7 12 10 14 7 2 3 6 6 20 3 5 0 6 3 19 8 14 5 3 9 5 10 2 8 7 4 7 9 6 11 11 8 9 6 0 7 4 5 7 9 7

Readme

Source
raw.​githubusercontent.​com

WHAT PHP COMPLETIONS KIT IS

Minimum Sublime Version Latest Stable Version GitHub stars Downloads Author

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.