SF commands shortcuts is a tiny AutoHotkey script to write Symfony commands efficiently. If you are familiar with tools like Emmet, you know what to expect.
You don't have to install anything.
Download the .ahk file if AutoHotkey is installed on your system (mandatory if you want to edit the script), otherwise the executable.
A shortcut consists of an acronym of what follows php app/console
, prefixed with an underscore (by default). To install assets, for example, you take the a from assets and the i from install: _ai
, and you get the output: php app/console assets:install
.
Another example: type _dccm
and you get php app/console doctrine:cache:clear-metadata
. That's it.
To list all the commands available in your Symfony project, just type a double underscore: __
.
When a shortcut can lead to different results, you need to complete the command name manually:
_td
will produce
REM [t]ranslation | [t]wig
php app/console t:debug
Spaces and caret position are handled accordingly.
If you have forgotten a nested word, you can enter his parent to display a reminder on a comment line:
_d:schema
will produce
REM :create | :drop | :update | :validate
php app/console doctrine:schema:
You can change or remove the default prefix (i.e. an underscore) with a basic search and replace.
By default, hotstrings are triggered with the tab key. You can edit line 7 to add more. For example:
#Hotstring EndChars -()[]{}:;'"/\,.?!`n `t
To avoid unintended effects, the script operates only on console windows. Perhaps you are using a console emulator which is not already taken into account. Append a new line with your software process name: GroupAdd, consoles, ahk_exe ProcessName.exe
.
In addition to the standard Symfony distribution, the script currently includes commands from the following bundles: FOS User and Doctrine Fixtures.
Simply replace all the occurrences of app/console
with bin/console
.