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 59K
  • Win 34K
  • OS X 12K
  • Linux 13K
Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31
Windows 1 23 30 33 31 18 22 22 23 33 30 35 20 22 21 27 28 41 31 14 27 27 25 36 31 32 26 20 26 45 30 33 32 25 25 29 47 37 33 30 30 30 27 31 24 26
OS X 0 2 8 4 8 4 5 7 7 12 6 7 3 7 9 10 7 8 7 4 8 4 8 7 13 6 5 3 5 8 13 12 7 3 9 5 7 7 13 6 2 9 6 12 9 6
Linux 0 11 10 9 9 8 4 3 4 12 8 11 6 12 5 5 8 8 8 6 5 8 15 15 15 10 9 12 7 9 7 10 8 9 14 4 11 12 18 5 7 11 12 14 8 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.