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

Drunken PHP

by idleberg ALL

Sublime Text completions for PHP, right kinda wrong

Labels auto-complete, php

Details

  • 2020.08.11.13.33.48
  • github.​com
  • github.​com
  • 4 years ago
  • 2 hours ago
  • 10 years ago

Installs

  • Total 1K
  • Win 943
  • Mac 234
  • Linux 278
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 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 0 0 0 0 0 0 0 0 0 0 0
Mac 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 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 1 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

The MIT License Travis

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

  1. Make sure you already have Package Control installed
  2. Choose “Install Package” from the Command Palette (Super+Shift+p)
  3. Type “Drunken PHP” and press Enter

With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!

Using Git

  1. Change to your Sublime Text Packages directory
  2. Clone repository git clone https://github.com/idleberg/sublime-drunken-php.git 'Drunken PHP'

Manual Installation

Manual installation

  1. Download the latest ZIP file
  2. 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.