Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TextMate command to open a markdown document in
#!/usr/bin/env ruby
require "base64"
message = "HG: Enter commit message. Lines beginning with 'HG:' are removed."
data =
data.gsub!(/^HG: .+\n/, '') if data.include? message
%x[open{Base64.encode64(data).gsub(/\n/, '')}]
+-[ COMMAND SETTINGS ]------------+
| Save: nothing |
| Input: entire document |
| Output: discard |
Copy link

Bundles » Bundle Editor » Edit Commands…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment