Permalink
Browse files

Add Lance's json pretty printing stuff.

  • Loading branch information...
1 parent 0f6ca39 commit a0ce3eda6e5da2981c425095ba82d1a9fb2a0630 @Raynes committed Jan 27, 2014
Showing with 9 additions and 0 deletions.
  1. +9 −0 init.el
View
@@ -244,3 +244,12 @@
(global-set-key (kbd "C-c C-s") 'set-the-fucking-virtualenv-directory)
(elpy-enable)
+
+;; json pretty printing
+
+(defun json-format ()
+ (interactive)
+ (save-excursion
+ (shell-command-on-region (mark) (point) "python -m json.tool" (buffer-name) t)))
+
+(global-set-key "\C-C\C-b" 'json-format)

0 comments on commit a0ce3ed

Please sign in to comment.