Drupal coder

Coda

Panic Coda Drupal snippets (clips)

I've been using Panic's Coda as my default editor/IDE for some time now. I've already shared the Drupal plugin I wrote on this blog. But one of the other tricks Coda allows me to do is snippet management using its Clips feature. There's quite a few Coda clips available on the net. Here I am sharing the Clips I use the most during Drupal development and theming.

February 04, 2010Coda, Drupal, snippets

Update : Panic Coda Drupal plugin - version 4

I've just created a (very) small update for the Drupal Coda Plugin. Coda is my favourite editor/IDE for Mac.

What's new?

  • FEATURE : Next to Control + H which searches the Drupal API and shows the results in the Coda browser you now have Control + Alt + H which displays the API in your external browser.
  • FEATURE : Tiny URL - Everyone does it, now this plugin too. Turns http://www.drupalcoder.com into http://tinyurl.com/yh3t3q5.
  • BUGFIX : Fixed a problem where extra whitespace was sometimes added after a replace command.

Update : Panic Coda Drupal plugin - version 3

I've just created a (very) small update for the Drupal Coda Plugin. Coda is my favourite editor/IDE for Mac.

What's new?

  • PHP Unserialize
  • JSON Decode

Update : Panic Coda Drupal plugin - version 2

Lots of new stuff in this update of the Drupal Coda plugin. Here's a list of all commands.

  • Drupal
    • API
    • Remove db query table accolades
    • Flush caches (Remark : only site mode)
    • Run cron (Remark : only site mode)
    • Create module (Remark : will be put in sites/all/modules/custom/...)
    • Delete cron semaphore (Remark : only site mode)
    • Backup (Remark : only site mode and needs backup_migrate)
  • Text
    • Remove trailing spaces
    • Uppercase
    • Lowercase
    • Slug
    • MD5
    • Base64 encode
    • Base64 decode
    • Join lines
    • Trim and join lines
    • Trim and join lines with space
    • Calculate length
    • Sort lines
    • Sort lines and remove duplicates
  • HTML
    • URL escape line/selection
    • URL unescape line/selection
    • Unordered list
    • Ordered list
    • Encode entities
    • Decode entities
    • Encode entites (exclude tags)
  • PHP
    • Run
    • Tidy
    • Validate syntax
  • XML
    • Format
  • HTTP
    • curl
    • wget
  • Source
    • Align assignments

Panic Coda Drupal plugin

Panic's Coda is a great editor/IDE (mac only). Since the latest version a new Plugin architecture is available. I haven't found any Drupal plugins yet, so I decided to write my own.

You can download the plugin here.

What's in it?

Drupal

API

Press ^H (ctrl + H) on a selected word to look it up on api.drupal.org. Selecting a hook, will look up the hook.

Flush caches

Flushes the caches. Same as going to admin/settings/performance and hitting the button there.

NOTE: You have to be in a Coda local Site. The root of the Coda local Site should be the root of your Drupal site.

Run cron

Runs cron on your site.

NOTE: You have to be in a Coda local Site. The root of the Coda local Site should be the root of your Drupal site.

Create module

Creates a module stub in sites/all/modules custom. If you select some text in some file (whatever file), the module name is that select text. If you haven't selected anything, the name is "New module".

NOTE: You have to be in a Coda local Site. The root of the Coda local Site should be the root of your Drupal site.

Text

Some text commands:
- Remove trailing spaces
- Uppercase
- Lowercase
- URL escape
- URL unescame
- Slug : Converts the selected text to a slug; removes all nog alphanumeric characters and replaces whitespace by dashes.