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

Drunken PHP

by idleberg ST2/ST3

Sublime Text completions for PHP, right kinda wrong

Labels auto-complete, php

Details

  • 2016.10.05.09.12.59
  • github.​com
  • github.​com
  • 1 year ago
  • 2 hours ago
  • 3 years ago

Installs

  • Total 1K
  • Win 664
  • OS X 185
  • Linux 216
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 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
Windows 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 2 0 1 0 1 0 0 0 0 0
OS X 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 1 0 0 0
Linux 0 0 0 0 0 0 1 1 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 1 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Drunken PHP for Sublime Text

The MIT License Package Control 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!

GitHub

  1. Change to your Sublime Text Packages directory
  2. Clone repository git clone https://github.com/idleberg/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.

Donate

You are welcome support this project using Flattr or Bitcoin 17CXJuPsmhuTzFV2k4RKYwpEHVjskJktRd