BalanceAssignments.codaplugin - A Coda plug-in for formatting multiple assignments.
The following examples are PHP, but the plug-in should work with any language.
It aligns assignments, so that code like this:
$something = new Something();
$something->beverage = 'coffee';
$something->horse = ShetlandPony::getInstance();
$something->answer = 42;
Becomes nice and pretty, like this:
$something = new Something();
$something->beverage = 'coffee';
$something->horse = ShetlandPony::getInstance();
$something->answer = 42;
It works with hashed arrays, too, so this:
$arr = array(
'answer' => 42,
'salmon' => 'yummy',
'spaghetti' => Spaghetti::with(Bolognese::getInstance()),
'a' => 'b',
);
Becomes this:
$arr = array(
'answer' => 42,
'salmon' => 'yummy',
'spaghetti' => Spaghetti::with(Bolognese::getInstance()),
'a' => 'b',
);
- Select the code you want to balance.
- Press CTRL+ALT+CMD+B
- Coda version 1.6
This is the preferred method.
cd ~/Library/Application\ Support/Coda/Plug-ins
git clone [email protected]:Ibmurai/BalanceAssignments.codaplugin.git
If Coda is running, you will need to quit and relaunch it.
- Download from github
- Move contents of package to
~/Library/Application Support/Coda/Plug-ins/BalanceAssignments.codaplugin
If Coda is running, you will need to quit and relaunch it.