# HG changeset patch # User Steve Losh # Date 1389624917 18000 # Node ID d66bfb2537feead7f6c88fdc7d0d5a69bf491ddc # Parent d5b61fd8e30a2e9f0cf052aea1f9ccc76f650a71 more shit diff -r d5b61fd8e30a -r d66bfb2537fe .hgsubstate --- a/.hgsubstate Tue Dec 24 10:17:39 2013 -0500 +++ b/.hgsubstate Mon Jan 13 09:55:17 2014 -0500 @@ -36,7 +36,7 @@ 78ab4b3df24fa2753d3dfc1be75ed5a3df1565b8 vim/bundle/smartinput c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup 8e1c1dc358de2132b7fbc1adaf94f528e3238e4d vim/bundle/splice -6eec2c131213850ed65fd6da494dfd1a0d620a4e vim/bundle/strftimedammit +26fbdd7d1f1aa5600d2ebf39bbdd292c38aac16e vim/bundle/strftimedammit 1a73f607f8f5477d6942df2eb6e7245c4864f4d3 vim/bundle/surround 14cb306414dda411b1809a088e18eb2796030095 vim/bundle/syntastic 2dee007ddae8156735cbae7f0cd4e0a24ba7287b vim/bundle/tslime diff -r d5b61fd8e30a -r d66bfb2537fe bin/bootstrap.sh --- a/bin/bootstrap.sh Tue Dec 24 10:17:39 2013 -0500 +++ b/bin/bootstrap.sh Mon Jan 13 09:55:17 2014 -0500 @@ -47,5 +47,6 @@ ensure_link "lib/dotfiles/bash_profile" ".bash_profile" ensure_link "lib/dotfiles/inputrc" ".inputrc" ensure_link "lib/dotfiles/fish/config.fish" ".config/fish/config.fish" +ensure_link "lib/dotfiles/fish/functions" ".config/fish/functions" echo completed diff -r d5b61fd8e30a -r d66bfb2537fe dotcss/vimeo.com.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dotcss/vimeo.com.css Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,2 @@ + +#likes_extras, .related_collections, #brozar { display: none !important;} diff -r d5b61fd8e30a -r d66bfb2537fe fish/config.fish --- a/fish/config.fish Tue Dec 24 10:17:39 2013 -0500 +++ b/fish/config.fish Mon Jan 13 09:55:17 2014 -0500 @@ -1,17 +1,5 @@ # Useful functions {{{ -function serve_this; python -m SimpleHTTPServer; end -function fabric; fab -i ~/.ssh/stevelosh $argv; end -function oldgcc; set -g CC /usr/bin/gcc-4.0 $argv; end -function tm; tmux -u2 $argv; end -function c; clear; end -function hl; less -R; end -function paththis; set PATH (pwd) $PATH $argv; end -function clc; ./bin/get-last-commit-url.py | pbcopy; end -function sc; mvn scala:console; end - -function swank; dtach -A /tmp/dtach-swank.sock -r winch lein ritz; end - function ef; vim ~/.config/fish/config.fish; end function ev; vim ~/.vimrc; end function ed; vim ~/.vim/custom-dictionary.utf-8.add; end @@ -25,140 +13,10 @@ function eg; vim ~/.gitconfig; end function es; vim ~/.slate; end -function sjoin -d "Join input lines into a single line with spaces"; tr '\n' ' '; end - -function lstrip -d "Strip whitespace from the left of each line" - sed -e 's/^[ \t]*//' -end - -function rstrip -d "Strip whitespace from the right of each line" - sed -e 's/[ \t]*$//' -end - -function lrstrip -d "Strip whitespace from both ends of each line" - lstrip | rstrip -end - -function pj - python -m json.tool | pygmentize -l json -end - -function vup - set -x VAGRANT_LOG debug - vagrant up $argv - set -e VAGRANT_LOG -end - -function ss; bcvi --wrap-ssh -- $argv; end -function bcvid; dtach -A /tmp/bcvi.socket bcvi --listener; end - -function spotlight-off; sudo mdutil -a -i off ; and sudo mv /System/Library/CoreServices/Search.bundle/ /System/Library/CoreServices/SearchOff.bundle/ ; and killall SystemUIServer; end -function spotlight-on; sudo mdutil -a -i on ; and sudo mv /System/Library/CoreServices/SearchOff.bundle/ /System/Library/CoreServices/Search.bundle/ ; and killall SystemUIServer; end -function spotlight-wat; sudo fs_usage -w -f filesys mdworker | grep "open" ; end - -set MUTT_BIN (which mutt) -function mutt; bash --login -c "cd ~/Desktop; $MUTT_BIN"; end - -function h; hg $argv; end -function g; git $argv; end - -function pbc; pbcopy; end -function pbp; pbpaste; end -function pbpb; pbp | pb; end - -function weechat; weechat-curses $argv; end - -function collapse; sed -e 's/ */ /g'; end -function cuts; cut -d' ' $argv; end - -function emptytrash -d "Empty the OS X trash folders" - sudo rm -rfv /Volumes/*/.Trashes - sudo rm -rfv ~/.Trash - sudo rm -rfv /private/var/log/asl/*.asl -end - -function urlencode - python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);" $argv -end -function urldecode - python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])" $argv -end - -function fixopenwith -d "Fix the shitty OS X Open With menu duplicates" - /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user - killall Finder - echo "Open With has been rebuilt, Finder will relaunch" -end - -function v; vim $argv; end -function V; vim . $argv; end - -function vu; vagrant up; end -function vs; vagrant suspend; end - -function o; open $argv; end -function oo; open .; end - -function wo; workon $argv; end -function deact; deactivate; end - -function psg -d "Grep for a running process, returning its PID and full string" - ps auxww | grep -i --color=always $argv | grep -v grep | collapse | cuts -f 2,11- -end - -function hey_virtualbox_shut_down_or_i_will_fucking_cut_you - VBoxManage controlvm $argv poweroff -end - -set AG_BIN (which ag) -function actual_ag - # Fuck you fish this is fucking ridiculous. Let me use $AG_BIN as - # a command. Or at least give me a way to do it like run $AG_BIN args or - # something jesus. - if test $AG_BIN = '/usr/local/bin/ag' - /usr/local/bin/ag $argv - else - if test $AG_BIN = '/usr/bin/ag' - /usr/bin/ag $argv - else - echo "Fish is a dick, sorry." - end - end -end -function ag -d "Run Ag with appropriate options." - if test -f '.agignore' - # Extra if statement because I can't figure out how to && things in - # a fish conditional and the documentation does not see fit to explain - # that little tidbit and can we please get a shell without complete - # bullshit as a scripting language syntax? - if grep -q 'pragma: skipvcs' '.agignore' - actual_ag --search-files -U $argv - else - actual_ag --search-files $argv - end - else - actual_ag --search-files $argv - end -end - -function count_t_tasks; ~/lib/t/t.py --task-dir="~/Dropbox/tasks" --list=tasks.txt | wc -l $argv; end -# set -g T_TASK_COUNT (count_t_tasks) -function t - ~/lib/t/t.py --task-dir="~/Dropbox/tasks" --list=tasks.txt $argv - set -g T_TASK_COUNT (count_t_tasks) -end - -function packfor - cp ~/Dropbox/tasks/pack-archive ~/Dropbox/tasks/pack.txt -end -function p - ~/lib/t/t.py --task-dir="~/Dropbox/tasks" --list=pack.txt $argv -end - -function s - ~/lib/t/t.py --task-dir="~/.simple-tasks" --list=tasks.txt $argv - set -g T_TASK_COUNT (count_t_tasks) -end +function ..; cd ..; end +function ...; cd ../..; end +function ....; cd ../../..; end +function .....; cd ../../../..; end # }}} # Completions {{{ @@ -260,19 +118,10 @@ . ~/.config/fish/virtualenv.fish # }}} -# Rubby {{{ - -if test -s /usr/local/bin/rbenv - /usr/local/bin/rbenv rehash 2>/dev/null -end - -# }}} # Z {{{ . ~/src/z-fish/z.fish -function j; z $argv; end - # }}} # Prompt {{{ @@ -350,42 +199,9 @@ end # }}} -# Directories {{{ - -function ..; cd ..; end -function ...; cd ../..; end -function ....; cd ../../..; end -function .....; cd ../../../..; end - -function md; mkdir -p $argv; end - -function l1; tree --dirsfirst -ChFL 1 $argv; end -function l2; tree --dirsfirst -ChFL 2 $argv; end -function l3; tree --dirsfirst -ChFL 3 $argv; end -function l4; tree --dirsfirst -ChFL 4 $argv; end -function l5; tree --dirsfirst -ChFL 5 $argv; end -function l6; tree --dirsfirst -ChFL 6 $argv; end - -function ll1; tree --dirsfirst -ChFupDaL 1 $argv; end -function ll2; tree --dirsfirst -ChFupDaL 2 $argv; end -function ll3; tree --dirsfirst -ChFupDaL 3 $argv; end -function ll4; tree --dirsfirst -ChFupDaL 4 $argv; end -function ll5; tree --dirsfirst -ChFupDaL 5 $argv; end -function ll6; tree --dirsfirst -ChFupDaL 6 $argv; end - -function l; l1 $argv; end -function ll; ll1 $argv; end - -# }}} -# Misc {{{ - -# }}} -# Local Settings {{{ if test -s $HOME/.config/fish/local.fish . $HOME/.config/fish/local.fish end -# }}} - true diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ag.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ag.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,32 @@ +set -g -x AG_BIN (which ag) + +function actual_ag + # Fuck you fish this is fucking ridiculous. Let me use $AG_BIN as + # a command. Or at least give me a way to do it like run $AG_BIN args or + # something jesus. + if test $AG_BIN = '/usr/local/bin/ag' + /usr/local/bin/ag $argv + else + if test $AG_BIN = '/usr/bin/ag' + /usr/bin/ag $argv + else + echo "Fish is a dick, sorry." + end + end +end + +function ag -d "Run Ag with appropriate options." + if test -f '.agignore' + # Extra if statement because I can't figure out how to && things in + # a fish conditional and the documentation does not see fit to explain + # that little tidbit and can we please get a shell without complete + # bullshit as a scripting language syntax? + if grep -q 'pragma: skipvcs' '.agignore' + actual_ag --search-files -U $argv + else + actual_ag --search-files $argv + end + else + actual_ag --search-files $argv + end +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/collapse.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/collapse.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function collapse -d "Collapse multiple spaces into single spaces" + sed -e 's/ */ /g' +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/cuts.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/cuts.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function cuts -d "Cut on space characters instead of tabs" + cut -d' ' $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/deact.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/deact.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function deact -d "deactivate" + deactivate +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/empty-trash.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/empty-trash.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +function emptytrash -d "Empty the OS X trash folders" + sudo rm -rfv /Volumes/*/.Trashes + sudo rm -rfv ~/.Trash + sudo rm -rfv /private/var/log/asl/*.asl +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/fabric.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/fabric.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function fabric -d "fab with my SSH identity" + fab -i ~/.ssh/stevelosh $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/fix-open-with.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/fix-open-with.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,7 @@ +function fix-open-with -d "Fix the shitty OS X Open With menu duplicates" + /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user + killall Finder + echo "Open With has been rebuilt, Finder will relaunch" +end + + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/g.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/g.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function g -d "git" + git $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/h.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/h.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function h -d "hg" + hg $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/hey-virtualbox-shut-down-or-i-will-fucking-cut-you.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/hey-virtualbox-shut-down-or-i-will-fucking-cut-you.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function hey-virtualbox-shut-down-or-i-will-fucking-cut-you + VBoxManage controlvm $argv poweroff +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/hi.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/hi.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function hi --argument pattern -d "Highlight a pattern in a stream of text" + grep -E --color=always --line-buffered "$pattern|\$" +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/hl.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/hl.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function hl -d "Highlighted Less" + less -R +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/j.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/j.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function j -d "j is the new z is the new j" + z $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l + l1 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l1.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l1.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l1 + tree --dirsfirst -ChFL 1 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l2.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l2.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l2 + tree --dirsfirst -ChFL 2 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l3.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l3.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l3 + tree --dirsfirst -ChFL 3 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l4.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l4.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l4 + tree --dirsfirst -ChFL 4 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l5.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l5.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l5 + tree --dirsfirst -ChFL 5 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/l6.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/l6.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function l6 + tree --dirsfirst -ChFL 6 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll + ll1 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll1.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll1.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll1 + tree --dirsfirst -ChFupDaL 1 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll2.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll2.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll2 + tree --dirsfirst -ChFupDaL 2 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll3.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll3.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll3 + tree --dirsfirst -ChFupDaL 3 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll4.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll4.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll4 + tree --dirsfirst -ChFupDaL 4 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll5.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll5.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll5 + tree --dirsfirst -ChFupDaL 5 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/ll6.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/ll6.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function ll6 + tree --dirsfirst -ChFupDaL 6 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/lrstrip.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/lrstrip.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +function lrstrip -d "Strip whitespace from both ends of each line" + lstrip | rstrip +end + + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/lstrip.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/lstrip.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function lstrip -d "Strip whitespace from the left of each line" + sed -e 's/^[ \t]*//' +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/md.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/md.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function md -d "mkdir" + mkdir -p $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/mutt.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/mutt.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +set -g -x MUTT_BIN (which mutt) + +function mutt + bash --login -c "cd ~/Desktop; $MUTT_BIN \$@" custom_mutt $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/o.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/o.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function o -d "open" + open $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/oldgcc.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/oldgcc.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function oldgcc -d "Set \$CC to the old GCC" + set -g CC /usr/bin/gcc-4.0 +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/oo.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/oo.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function oo -d "open ." + open . +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/p.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/p.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function p + ~/lib/t/t.py --task-dir="~/Dropbox/tasks" --list=pack.txt $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/packfor.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/packfor.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function packfor + cp ~/Dropbox/tasks/pack-archive ~/Dropbox/tasks/pack.txt +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/path_this.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/path_this.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function path_this -d "Add the cwd to the front of PATH" + set PATH (pwd) $PATH +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/pbc.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/pbc.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function pbc -d "pbcopy" + pbcopy $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/pbp.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/pbp.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function pbp -d "pbpaste" + pbpaste $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/pbpb.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/pbpb.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function pbpb -d "pbpaste to pastebin site" + pbp | pb +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/pj.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/pj.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function pj -d "Prettify JSON" + python -m json.tool | pygmentize -l json +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/psg.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/psg.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +function psg -d "Grep for a running process, returning its PID and full string" + ps auxww | grep -i --color=always $argv | grep -v grep | collapse | cuts -f 2,11- +end + + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/rstrip.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/rstrip.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function rstrip -d "Strip whitespace from the right of each line" + sed -e 's/[ \t]*$//' +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/sc.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/sc.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function sc -d "Launch a Scala console" + mvn scala:console $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/serve-this.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/serve-this.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function serve-this -d "Launch a webserver on 8000 serving the cwd" + python -m SimpleHTTPServer +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/sjoin.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/sjoin.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function sjoin -d "Join input lines into a single line with spaces" + tr '\n' ' ' +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/spotlight-off.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/spotlight-off.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +function spotlight-off -d "Turn off Spotlight indexing" + sudo mdutil -a -i off + and sudo mv /System/Library/CoreServices/Search.bundle/ /System/Library/CoreServices/SearchOff.bundle/ + and killall SystemUIServer +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/spotlight-on.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/spotlight-on.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,5 @@ +function spotlight-on -d "Turn on Spotlight indexing" + sudo mdutil -a -i on + and sudo mv /System/Library/CoreServices/SearchOff.bundle/ /System/Library/CoreServices/Search.bundle/ + and killall SystemUIServer +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/spotlight-tail.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/spotlight-tail.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function spotlight-tail -d "Watch what Spotlight is doing" + sudo fs_usage -w -f filesys mdworker | grep "open" +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/t.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/t.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function t + ~/lib/t/t.py --task-dir="~/Dropbox/tasks" --list=tasks.txt $argv +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/tm.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/tm.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function tm "tmux" + tmux -u2 $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/urldecode.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/urldecode.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function urldecode -d "Urldecode the input into plaintext output" + python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])" $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/urlencode.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/urlencode.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,4 @@ +function urlencode -d "Urlencode the plaintext input" + python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);" $argv +end + diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/weechat.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/weechat.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function weechat + weechat-curses $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe fish/functions/wo.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/wo.fish Mon Jan 13 09:55:17 2014 -0500 @@ -0,0 +1,3 @@ +function wo -d "workon" + workon $argv +end diff -r d5b61fd8e30a -r d66bfb2537fe vim/vimrc --- a/vim/vimrc Tue Dec 24 10:17:39 2013 -0500 +++ b/vim/vimrc Mon Jan 13 09:55:17 2014 -0500 @@ -297,7 +297,7 @@ vnoremap gu u " Rebuild Ctags (mnemonic RC -> CR -> ) -nnoremap :silent !myctags:redraw! +nnoremap :silent !myctags >/dev/null 2>&1 &:redraw! " Highlight Group(s) nnoremap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' @@ -945,7 +945,8 @@ " Use 1/2/3 to add headings. au Filetype markdown nnoremap 1 yypVr=:redraw au Filetype markdown nnoremap 2 yypVr-:redraw - au Filetype markdown nnoremap 3 mzI###`zllll + au Filetype markdown nnoremap 3 mzI###`zllll + au Filetype markdown nnoremap 4 mzI####`zlllll au Filetype markdown nnoremap p VV:'<,'>!python -m json.tool au Filetype markdown vnoremap p :!python -m json.tool