AutoPHPDollar
Type the variable name without "$", and this plugin add it.
Details
Installs
- Total 7K
- Win 4K
- Mac 1K
- Linux 1K
Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 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 | 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
Synopsis
This is a Sublime Text 2 plugin.
Add “$” symbol before PHP variable name
AutoPHPDollar automatically insters “$” character before variables. Type the variable name without “$”, and this plugin add it.
Installation
Go to your Packages
subdirectory under ST2's data directory:
- Windows:
%APPDATA%\Sublime Text 2
- OS X:
~/Library/Application Support/Sublime Text 2/Packages
- Linux:
~/.config/sublime-text-2
- Portable Installation:
Sublime Text 2/Data
Then clone this repository:
git clone git://github.com/graarh/sublime-AutoPHPDollar.git
That's it!
Options
Several options are available to customize the plugin behavior.
Add rules for detecting variables
You can add custom rules, that improves variables detection. The rule contains regular expression to find a variable without dollar character, and the replacement of found text.
"rules": [
{
"search": "(?<![\\$\\w\\d\\>])(\\w[\\w\\d]*)(?=\\s*=)",
"replace": "$\\1"
}
]
Add keywords or buildin function names to ignore names list
You can add words, that should be ignored by plugin. It can be buildin function name, like array_walk, or PHP keyword. In PHP, you can use variable name like $private, but you dont want to add the $ sign to each “private” you typed. So, add this name to this list. “ js "ignore names”: [ “private”, “public”, “protected” ]
### Add keywords, that never followed by variable
You can add words, that never has variable name after it. For example, this is the function keyword.
You can not use constructions like function $myfuncname($args) in PHP, so you do not want to add $ sign to the function name. Or constant name.
``` js
"ignore after": [
"class",
"function",
"const"
]
Roadmap and TODO:
- improve variables detection