Skip to content

Instantly share code, notes, and snippets.

@JonTheWhite
Created November 19, 2011 18:46
Show Gist options
  • Save JonTheWhite/1379209 to your computer and use it in GitHub Desktop.
Save JonTheWhite/1379209 to your computer and use it in GitHub Desktop.
Aptana Command - debug
require 'ruble'
command 'Debug this line' do |cmd|
cmd.key_binding = 'M1+M2+Q'
cmd.scope = 'source.php'
cmd.output = :insert_as_snippet
cmd.input = :selection, :line
cmd.invoke do |context|
line = STDIN.read
space = line.match('^\s*')[0]
space + '\Core_Debug::dumps(' + line.gsub(';', '').gsub('$', '\$').lstrip + ');'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment