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 57K
  • Win 33K
  • OS X 12K
  • Linux 12K
Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 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
Windows 6 39 28 32 22 26 37 19 40 37 22 22 42 26 37 45 36 28 23 27 25 41 38 31 25 30 39 41 41 38 33 24 29 42 63 40 30 27 28 24 32 21 27 36 31 16
OS X 0 13 3 9 4 6 16 10 6 10 11 7 10 10 9 9 7 8 5 3 11 9 16 6 8 15 11 6 10 18 15 5 10 16 23 15 5 8 2 8 7 5 8 9 5 6
Linux 6 20 6 7 15 6 6 3 10 8 8 7 11 12 9 22 9 6 6 12 5 6 12 7 10 5 12 10 7 16 10 10 10 11 25 19 7 7 11 5 11 8 14 9 5 8

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.

OVERVIEW

FEATURES

  • PHP ~7.0
  • PSR compatible
  • 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, mcrypt, 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.

INSTALLATION

Package Control installation

The preferred method of installation is Package Control.

Manual installation

  1. Close Sublime Text.
  2. 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
    • OS X: 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
  3. Done!

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 Preferences > Settings

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

Set them per-project: Project > Edit Project

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

CONTRIBUTING

Your issue reports and pull requests are always welcome.

CHANGELOG

See CHANGELOG.md.

LICENSE

Released under the BSD 3-Clause License.