Skip to content

Instantly share code, notes, and snippets.

@veryhappythings
Created August 18, 2009 14:27
Show Gist options
  • Save veryhappythings/169739 to your computer and use it in GitHub Desktop.
Save veryhappythings/169739 to your computer and use it in GitHub Desktop.
Pretty print command for textmate. Works in extremely limited situations!
#!/usr/bin/env python
import json
import os
import pprint
import sys
input = os.environ.get('TM_SELECTED_TEXT')
input = input.replace("'", '"')
sys.stdout.write(pprint.pformat(json.loads(input)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment