subDrush
Drush integration for Sublime Text 3 to facilitate Drupal development.
Details
Installs
- Total 1K
- Win 470
- Mac 595
- Linux 387
Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 1 | 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
subDrush (Sublime Drush plugin)
This is plugin for Sublime Text 3 (ST3) that exposes a subset of Drush functionality to facilitate Drupal development.
This is not an attempt to bring the entirety of Drush into Sublime Text. Instead the idea is that there are some commands that can be executed easily from within ST, such as clearing caches, getting values of variables, enabling or disabling modules and themes, etc. Such commands typically don't require numerous options and usually do not require additional user input to run. These kinds of commands will be added to subDrush - for other Drush commands, use your terminal.
Supported Commands
Command | Description | Type |
---|---|---|
cache-clear |
Clear a specific cache bin | core |
cache-clear all |
Clear all caches | core |
core-status |
Provides a birds-eye view of the Drupal installation | core |
watchdog-show |
Displays the 10 most recent watchdog entries | core |
variable-get |
Displays the value of a Drupal variable | core |
cron |
Invokes cron for open Drupal directory | core |
php-eval |
Evaluates selected text in the bootstrapped Drupal site | core |
php-script |
Executes open buffer as PHP script after Drupal bootstrap | core |
pm-list |
Show a list of available extensions (modules and themes) | core |
updatedb |
Run update.php on site | core |
alias-edit |
Edit the Drush aliases (current site or choose from list) | custom |
Clear Sublime Drush cache |
Clears Sublime Drush internal cache | custom |
See the issue queue for commands that are in progress.
Usage
This plugin works best when you have a Drupal directory open in ST3, or a directory immediately below your Drupal root. This allows subDrush to know about the local Drupal environment, and lets you interact with the local Drupal site's database.
For example, suppose your site directory structure looks like this:
/path/to/repo/docroot <-- Where Drupal core is
/path/to/repo/resources <-- Miscellaneous scripts
/path/to/repo/tests <-- Any tests you've written, etc
In Sublime Text 3, if you go to File -> Open and open up /path/to/repo
or /path/to/repo/docroot
this plugin will work fine, and will be able to accurately identify the Drupal root to pass to Drush.
If you want, you can also open a single file in ST3 (for example, /path/to/repo/docroot/modules/color/color.module
), and subDrush will identify the Drupal root by using the drush dd
command.
Open up the command palette (Ctrl + Shift + P), type drush
to see the commands.
Feel free to create your own key bindings as none are provided by this plugin.
Requirements
- Sublime Text 3 (Build 3033 or later)
- Only Mac OS 10.8 and Linux (specifically Arch Linux) are known to have been tested. Windows should work fine though.
Drush
The latest stable release of Drush comes bundled with this plugin. By default, subDrush will use its own bundled version of Drush. However, if you prefer to use another version of Drush (for example, if you are developing with Drupal 8 and need Drush 7), then check out Preferences > Package Settings > subDrush > Settings - Default for instructions on how to use an alternate version of Drush. Drush 5 is not supported.
Drupal
Some commands don't work consistently with Drupal 6 (for example, php-script
and php-eval
). All commands are tested against Drupal 7.
Installation
Use Sublime Package Control and search for subDrush
. Alternatively, clone this repository into the Packages
directory - see the Sublime Text 3 docs for more information.
Credits
This plugin was written and is maintained by Kosta Harlan with support from DesignHammer Media Group.
The ThreadProgress class is borrowed from wbond's Sublime Package Control plugin.
License
A Sublime Text 3 Plugin that integrates with Drush
Copyright © 2013 Kosta Harlan
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.