Sublime Text 2 configuration
Â
Resources
- Overview:Â http://tarantsov.com/blog/2012/02/sublime-text-workflow-that-beats-coda-and-espresso
- Drupal Development using Sublime Text 2 in 5 Steps – great blog post from Reality Loop on how to configuration
- Configuration on d.o.Â
- Keyboard Shortcuts (Mac)
- Keyboard Shortcuts (Windows)
- Package Control
Useful Plugins
- Alignment
- BracketHighlighter
- Clipboard History
- CodeIntel
- DocBlockr
- Drupal Autocomplete
- Drupal Sublime Snippets
- Goto Documentation
- Goto Drupal API
- HTMLAttributes
- JavaScript Refactor
- jQuery
- Node.js
- SASS
- SideBar Enhancements
- SublimeLinter
- Tag
- Terminal
- Tern for Sublime
- TODO
- view-in-browser
- WordHighlight
XDEBUG
Was able to get XDEBUG working with this new plugin https://github.com/martomo/SublimeTextXdebug. Need to follow the directions in the readme for constructing appropriate settings. I have attached an example of kalademo.sublime-project:
Â
{ "folders": [ { "path": "/Users/mpirog/kalabox/www/kalademo" } ], "settings": { "xdebug": { "path_mapping": { "/var/www/kalademo" : "/Users/mpirog/kalabox/www/kalademo" }, "ide_key": "sublime.xdebug", "url": "kalademo.kala", "port": 9000 } } }
Â
In order to get the get the debugger running you need to attach the following to the page you are debugging:
 ?XDEBUG_SESSION_START=sublime.xdebug
You will get output like this:
I think you can get the session to persist if you launch the browser from ST2 with the xdebug launch command. This should enable you to debug submit buttons.
Drush
I've been able to debug drush by using this old jank program:Â http://www.bluestatic.org/software/macgdbp/index.phpÂ
Â
You need to share your drush folder in vagrant. There is now a commented out line you can uncomment in the vagrant file to do this. However, you will want to copy /usr/var/drush on the guest into ~/kalabox/drush on the host first otherwise it will empty out drush on the guest and you will lose
all of that shit. Once you have shared the drush folder you need to make sure you specify a path mapping in MacGDBP in the preferences. The mapping should be remote: /usr/share/drush local: /Users/YOURUSERNAME/kalabox/drush. Add a breakpoint in this program and then run a drush command on the guest and it should catch at the breakpoint.
Â