957e7c0065e9

mooooore shit
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 24 Feb 2014 12:30:27 -0500
parents d6b09d11fdb8
children a71a9f4b59fd
branches/tags (none)
files fish/functions/pj.fish fish/functions/ppj.fish vim/vimrc

Changes

--- a/fish/functions/pj.fish	Thu Feb 20 15:55:57 2014 -0500
+++ b/fish/functions/pj.fish	Mon Feb 24 12:30:27 2014 -0500
@@ -1,4 +1,9 @@
 function pj -d "Prettify JSON"
-    python -m json.tool | pygmentize -l json
+    if test "$argv[1]" = "-C"
+        # no color
+        python -m json.tool
+    else
+        python -m json.tool | pygmentize -l json
+    end
 end
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/ppj.fish	Mon Feb 24 12:30:27 2014 -0500
@@ -0,0 +1,3 @@
+function ppj -d "Prettify Pasteboard JSON"
+    pbp | pj
+end
--- a/vim/vimrc	Thu Feb 20 15:55:57 2014 -0500
+++ b/vim/vimrc	Mon Feb 24 12:30:27 2014 -0500
@@ -1112,9 +1112,15 @@
     au!
 
     au BufNewFile,BufRead *.sql set filetype=pgsql
+    au BufNewFile,BufRead *.pgsql set filetype=pgsql
+
     au FileType pgsql set foldmethod=indent
     au FileType pgsql set softtabstop=2 shiftwidth=2
     au FileType pgsql setlocal commentstring=--\ %s comments=:--
+
+    " Send to tmux with localleader e
+    au FileType pgsql nnoremap <buffer> <silent> <localleader>e :let psql_tslime_view = winsaveview()<cr>vip"ry:call SendToTmux(@r)<cr>:call winrestview(psql_tslime_view)<cr>
+
 augroup END
 
 " }}}