Giter Club home page Giter Club logo

sf-commands-shortcuts's Introduction

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.

Installing

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.

Usage

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:

Customization

Shortcuts prefix

You can change or remove the default prefix (i.e. an underscore) with a basic search and replace.

Ending characters

By default, hotstrings are triggered with the tab key. You can edit line 7 to add more. For example:

#Hotstring EndChars -()[]{}:;'"/\,.?!`n `t

FAQ

Why the shortcuts do nothing

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.

Which commands are available

In addition to the standard Symfony distribution, the script currently includes commands from the following bundles: FOS User and Doctrine Fixtures.

How to make the script work with Symfony 3

Simply replace all the occurrences of app/console with bin/console.

sf-commands-shortcuts's People

Contributors

charlesnannan avatar

Stargazers

Mathieu Roux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.