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

Symfony​Commander

by pdaether ST2

A Sublime Text 2 package that integrates the symfony 2 console right into your editor.

Details

  • 2012.09.25.05.27.33
  • github.​com
  • github.​com
  • 12 years ago
  • 2 hours ago
  • 13 years ago

Installs

  • Total 5K
  • Win 2K
  • Mac 1K
  • Linux 2K
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 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
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

SymfonyCommander

SymfonyCommnader is a small Sublime Text 2 package that transforms your editor of choice into a lightweight Symfony 2 IDE

Get an overview of SymfonyCommander on the project page.

This Sublime Text 2 package integrates the most common Symfony 2 console commands right into your lovely editor of choice ™. Additional you get some great little helpers for writing Symfony2 code.

It provides the following features:

  • Switching between Template and the corresponding Controller/Action
  • Autocompletion for template, entitiy, routing and service names
  • Searching within the online api and the online documentation
  • Clear the cache
  • Warmup an empty cache
  • Assetic: Dump all assets to the filesystem
  • Install bundles web assets under the public web directory
  • Display current routes for an application
  • Displays current services for an application
  • Send emails from the spool
  • Doctrine: Clear result cache
  • Doctrine: Clear query cache
  • Doctrine: Clear meta cache
  • Run testcases in Sublime Text

More commands are on the way. If you want to be informed about new versions of this plugin just watch this repro on github or watch out for some tweets.

If you need some Symfony code snippets in addition to this package just install sublime-symfony2. It is a great package for speed up your Symfony 2 development as well.

Changelog

2012-09-22 (1.2.2)

  • Run testcases in Sublime Text
  • Enable commands only when relevant (thanks to @leek)
  • new project page

2012-07-13 (1.2.1)

  • Autocompletion for templates and entities
  • Optimized the autocompletion logig further
  • SymfonyCommander Autocompletion now works in YAML and XML files too

2012-07-05 (1.2.0)

  • Autocompletion for routing and service names now checks for the prefix.
  • Autocompletion for routing and service names is now limited to a string context in PHP, HTML and Twig to reduce clutter.
  • Use php from PATH by default and disable ANSI output (thanks to @Seldaek)

2012-05-24:

  • Restructuring and cleanup some code.
  • Added autocompletion for routing and service names.
  • Fixed wrong command name (thanks to @iamthes)
  • Fixed Shortkey bug

2012-05-09:

  • Added function to switch between Action and corresponding template file

2012-05-04:

  • New features: Clear Doctrine caches an show mapping info

2012-05-03:

  • Added container:debug as a command

2012-04-18:

  • First published Version

Usage

Command Palette

Open the Command Palette with the shortcut Command+Shift+P on OS X or Control+Shift+P otherwise. Alternative you can open the Command Palette in the menu (Tools -> Command Palette…).

Speed up tip:

You don't need to type the complete command (SymfonyCommander...) in the Command Palette to get to to the right command. For example if you type something short like sccl you get directly to the SymfonyCommander cache:clear commands.

Context menu or main menu

You can call the Symfony commands through the context menu of an file or the main menu Tools -> SymfonyCommander.

Shortcuts

SymfonyCommader has some shortcuts defined:

  • To switch between a Controller Action an the corresponding Template you can use ctrl+alt+s on Windows and Linux or alt+super+s on OS X. At the moment this only works, if the names of your Action an the corresponding template are matching the naming conventions and you are using Twig (for example indexAction and index.html.twig).
  • To clear the cache in the development environment just type ctrl+alt+c on Windows and Linux or alt+super+c on OS X.

You can of cause change or add shortcuts in the user settings.

Autocompletion

With SymfonyCommander you get autocompletion for routes and service names while you are typing.

In addition, there are two commands SymfonyCommander Select Route and SymfonyCommander Select Service in the Command Palette for selecting an entry with more Infos:

Info: For performance reasons the routes and service names are cached internally. To flush the cache just call the command SymfonyCommander Flush Cache over the Command Palette.

Install

Installation with Package Control (recommended)

  1. The easiest way to install SymfonyCommander is through Package Control, which can be found here.

  2. After the installation of Package Control bring up the Command Palette (Command+Shift+P on OS X, Control+Shift+P otherwise). Select “Package Control: Install Package” and wait until the list with all available packages will appear.

  3. Than select “SymfonyCommander”.

Package Control will automatically keep SymfonyCommander up to date with the latest version.

Installation with git

Clone this repository in your Sublime Packages directory which you can find here:

  • OS X : ~/Library/Application Support/Sublime Text 2/Packages/
  • Linux: ~/.Sublime Text 2/Packages/
  • Windows: %APPDATA%/Sublime Text 2/Packages/

Configuration

Global settings

Settings can be configured with a SymfonyCommander.sublime-settings file in your User folder. You can copy the one provided in this package.

{
    "php_command": "/usr/bin/php",
    "api_search_version": "master",
    "doc_search_version": "master"
}

php_command: With php_command you can define where SymfonyCommander can find the php binary. If it is false than SymfonyCommader calls the Symfony console directly without php binary (works well on OS X an Linux). Otherwise you can point php_command to the php binary path, for example C:\php\php.exe or /usr/bin/php. The default is false.

api_search_version: This setting determines which version of the symfony api should be used for searching, could be master or something like v2.0.14. The default is master.

doc_search_version: This setting determines which version of the symfony online documentation should be used for searching, could be either master or 2.0. The default is master.

Project specific settings

SymfonyCommander tries to find the Symfony app/console script automatically. Therefor SymfonyCommander takes the active file an traverses the directory path up and searches for app/console. This works in most cases.

Otherwise you have to tell SymfonyCommander where to find the console script on a project basis. To point SymfonyCommander to the root directory of your Symfony installation you need to set this path in the Sublime Text Project file (*.sublime-project) under the settings-section.

"settings":{
    "SymfonyCommander":{
        "base_directory": "/www/htdocs/your-symfony-project/"
    }
}

License

MIT License

Copyright © 2012 Patrick Daether, public < at > pd-digital.de

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.