Commits

Steve Losh committed 957e7c0

mooooore shit

Comments (0)

Files changed (3)

fish/functions/pj.fish

 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
 

fish/functions/ppj.fish

+function ppj -d "Prettify Pasteboard JSON"
+    pbp | pj
+end
     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
 
 " }}}