Drunken PHP
Sublime Text completions for PHP, right kinda wrong
Details
Installs
- Total 1K
- Win 955
- Mac 238
- Linux 283
Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Drunken PHP for Sublime Text
Description
PHP is often criticized for having an inconsistent syntax and this is exactly what Drunken PHP aims at. It's a set of alternative command completions, including aliases for ill-formed syntax. Read the Aliases section below for examples.
Note: More recent versions of Sublime Text 3 received a much improved fuzzy completion. Nevertheless, I still believe that this package makes for a good companion to your standard PHP completions. However, I'm undecided about the future of this project, it's clearly far from being complete. Should you be interested in helping out, feel free to submit a pull request.
Installation
Package Control
- Make sure you already have Package Control installed
- Choose “Install Package” from the Command Palette (Super+Shift+p)
- Type “Drunken PHP” and press Enter
With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!
Using Git
- Change to your Sublime Text
Packages
directory - Clone repository
git clone https://github.com/idleberg/sublime-drunken-php.git 'Drunken PHP'
Manual Installation
Manual installation
- Download the latest ZIP file
- Unzip the archive to your Sublime Text
Packages
directory
Usage
As with all completions, type and press Tab
to complete the command. Press Tab
again to jump to the next parameter, Shift+Tab
to jump back. Note there are two jumps available when the parameter defaults to a variable.
Aliases
You can tell apart Drunken PHP from proper syntax from the %
-prefix displayed in the command completion window. Aliases have been broken up into the following categories:
Prince Versions
Named after the Prince Emulator in Douglas Coupland's Microserfs, you can substitute any to
with the number 2
and vice versa.
Examples:
PHP | Alias |
---|---|
bin2hex |
bintohex |
cal_to_jd |
cal2jd |
Spacing
Enables you to type commands with or without spacing. Probably obsolete due to fuzzy completions.
Examples:
PHP | Alias |
---|---|
get_html_translation_table |
gethtmltranslationtable |
getimagesizefromstring |
get_image_size_from_string |
Spelling
Corrects common spelling mistakes.
Examples:
PHP | Alias |
---|---|
mb_strwidth |
mb_strwidht |
ob_get_length |
ob_get_lenght |
phpversion |
phpverison |
Synonyms
Makes some native syntax more descriptive
Examples:
PHP | Alias |
---|---|
asin |
arc_sin (or arcsin ) |
asort |
array_sort |
bzcompress |
bzip_compress |
Word Order
The order of noun and verb is reversible
Examples:
PHP | Alias |
---|---|
ini_get |
get_ini |
get_class |
class_get |
License
This work is licensed under the The MIT License.