--- a/config/fish/config.fish Mon Jun 04 11:00:25 2012 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-set tacklebox_path ~/lib/tacklebox
-set tacklebox_theme prose
-set tacklebox_plugins directories python django misc web osx
-
-. $tacklebox_path/tacklebox.fish
-
-# Useful aliases -------------------------------------------------------------
-alias j 'z'
-alias fab 'fab -i ~/.ssh/stevelosh'
-alias oldgcc 'set -g CC /usr/bin/gcc-4.0'
-alias tm 'tmux -u2'
-alias c 'clear'
-alias M 'mvim .'
-alias pman 'pretty_man'
-alias pj 'pretty_json'
-alias cj 'curl_json'
-alias dv 'dtach -A /tmp/dvtm-session.sock -r winch dvtm -m "^f"'
-
-# Environment variables ------------------------------------------------------
-set PATH "$HOME/.gem/ruby/1.8/bin:$PATH"
-set PATH "/usr/local/bin:/usr/local/sbin:$HOME/bin:/opt/local/bin:$PATH"
-set PATH "/opt/subversion/bin:$PATH"
-set -g -x EDITOR vim
-set -g -x COMMAND_MODE unix2003
-set -g -x RUBYOPT rubygems
-set -g -x CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar"
-
-# Python variables -----------------------------------------------------------
-set -g -x PIP_DOWNLOAD_CACHE "$HOME/.pip/cache"
-set -g -x PYTHONSTARTUP "$HOME/.pythonrc.py"
-set -g -x WORKON_HOME "$HOME/lib/virtualenvs"
-
-set PATH "$PATH:/usr/local/Cellar/PyPi/3.6/bin"
-set PATH "$PATH:/usr/local/Cellar/python/2.7.1/bin"
-set PATH "$PATH:/usr/local/Cellar/python/2.7/bin"
-set PATH "$PATH:/usr/local/Cellar/python/2.6.5/bin"
-
-set -g -x PYTHONPATH ""
-set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7.1/site-packages"
-set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7/site-packages"
-set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.6/site-packages"
-set PYTHONPATH "$HOME/lib/python/see:$PYTHONPATH"
-
-# Mercurial variables --------------------------------------------------------
-set PATH "$HOME/lib/hg/hg-stable:$PATH"
-set PYTHONPATH "$HOME/lib/hg/hg-stable:$PYTHONPATH"
-
-# Extra ----------------------------------------------------------------------
-. ~/src/z-fish/z.fish
-
-# Local Settings -------------------------------------------------------------
-if test -s $HOME/.config/fish/local.fish
- source $HOME/.config/fish/local.fish
-end
-
-function z_add --on-event prompt
- z --add "$PWD"
-end
-
-# hgd (for now) --------------------------------------------------------------
-
-function h
- /Users/sjl/src/hgd/hd $argv
-end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/config.fish Thu Jun 07 16:28:55 2012 -0400
@@ -0,0 +1,196 @@
+# Useful aliases {{{
+
+alias fab 'fab -i ~/.ssh/stevelosh'
+alias oldgcc 'set -g CC /usr/bin/gcc-4.0'
+alias tm 'tmux -u2'
+alias c 'clear'
+alias ef 'vim ~/.config/fish/config.fish'
+
+alias h 'hg'
+alias g 'git'
+
+alias v 'vagrant'
+alias vu 'vagrant up'
+alias vs 'vagrant suspend'
+
+# }}}
+# Environment variables {{{
+
+set PATH "$HOME/.gem/ruby/1.8/bin:$PATH"
+set PATH "/usr/local/bin:/usr/local/sbin:$HOME/bin:/opt/local/bin:$PATH"
+set PATH "/opt/subversion/bin:$PATH"
+set PATH "$HOME/lib/hg/hg-stable:$PATH"
+
+set BROWSER open
+
+set -g -x fish_greeting ''
+set -g -x EDITOR vim
+set -g -x COMMAND_MODE unix2003
+set -g -x RUBYOPT rubygems
+set -g -x CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar"
+
+# }}}
+# Python variables {{{
+
+set -g -x PIP_DOWNLOAD_CACHE "$HOME/.pip/cache"
+set -g -x PYTHONSTARTUP "$HOME/.pythonrc.py"
+set -g -x WORKON_HOME "$HOME/lib/virtualenvs"
+
+set PATH "$PATH:/usr/local/Cellar/PyPi/3.6/bin"
+set PATH "$PATH:/usr/local/Cellar/python/2.7.1/bin"
+set PATH "$PATH:/usr/local/Cellar/python/2.7/bin"
+set PATH "$PATH:/usr/local/Cellar/python/2.6.5/bin"
+
+set -g -x PYTHONPATH ""
+set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7.1/site-packages"
+set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7/site-packages"
+set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.6/site-packages"
+set PYTHONPATH "$HOME/lib/python/see:$PYTHONPATH"
+set PYTHONPATH "$HOME/lib/hg/hg-stable:$PYTHONPATH"
+
+# }}}
+# Z {{{
+
+. ~/src/z-fish/z.fish
+
+alias j 'z'
+
+# }}}
+# Prompt {{{
+
+set normal (set_color normal)
+set magenta (set_color magenta)
+set yellow (set_color yellow)
+set green (set_color green)
+set gray (set_color -o black)
+set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal<
+patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
+
+function hg_prompt
+ # hg prompt --angle-brackets $hg_promptstring 2>/dev/null
+end
+
+function git_prompt_status
+ set INDEX (git status --porcelain ^ /dev/null)
+ set STATUS ""
+
+ if echo "$INDEX" | grep '^?? ' > /dev/null ^&1
+ echo "$INDEX"
+ echo trolololol
+ set STATUS "lololol$STATUS"
+ end
+
+ if echo "$INDEX" | grep '^A ' > /dev/null ^&1
+ set STATUS "+$STATUS"
+ else
+ if echo "$INDEX" | grep '^M ' > /dev/null ^&1
+ set STATUS "+$STATUS"
+ end
+ end
+
+ if echo "$INDEX" | grep '^ M ' > /dev/null ^&1
+ set STATUS "!$STATUS"
+ else
+ if echo "$INDEX" | grep '^AM ' > /dev/null ^&1
+ set STATUS "!$STATUS"
+ else
+ if echo "$INDEX" | grep '^ T ' > /dev/null ^&1
+ set STATUS "!$STATUS"
+ end
+ end
+ end
+
+ if echo "$INDEX" | grep '^R ' > /dev/null ^&1
+ set STATUS ">$STATUS"
+ end
+
+ if echo "$INDEX" | grep '^ D ' > /dev/null ^&1
+ set STATUS "-$STATUS"
+ else
+ if echo "$INDEX" | grep '^AD ' > /dev/null ^&1
+ set STATUS "-$STATUS"
+ end
+ end
+
+ if echo "$INDEX" | grep '^UU ' > /dev/null ^&1
+ set STATUS "C$STATUS"
+ end
+
+ echo -n $STATUS
+end
+
+function git_prompt
+ if git root >/dev/null 2>&1
+ set_color normal
+ printf ' on '
+ set_color magenta
+ printf '%s' (git currentbranch ^/dev/null)
+ set_color green
+ # git_prompt_status
+ set_color normal
+ end
+end
+
+function fish_prompt
+ z --add "$PWD"
+
+ echo
+
+ set_color magenta
+ printf '%s' (whoami)
+ set_color normal
+ printf ' at '
+
+ set_color yellow
+ printf '%s' (hostname|cut -d . -f 1)
+ set_color normal
+ printf ' in '
+
+ set_color $fish_color_cwd
+ printf '%s' (prompt_pwd)
+ set_color normal
+
+ hg_prompt
+ git_prompt
+
+ echo
+
+ set_color white -o
+ printf '><> '
+
+ set_color normal
+end
+
+# }}}
+# Directories {{{
+
+alias .. 'cd ..'
+alias ... 'cd ../..'
+alias .... 'cd ../../..'
+alias ..... 'cd ../../../..'
+
+alias md 'mkdir -p'
+
+alias l1 'tree --dirsfirst -ChFL 1'
+alias l2 'tree --dirsfirst -ChFL 2'
+alias l3 'tree --dirsfirst -ChFL 3'
+
+alias ll1 'tree --dirsfirst -ChFupDaL 1'
+alias ll2 'tree --dirsfirst -ChFupDaL 2'
+alias ll3 'tree --dirsfirst -ChFupDaL 3'
+
+alias l 'l1'
+alias ll 'll1'
+
+# }}}
+# Local Settings {{{
+
+if test -s $HOME/.config/fish/local.fish
+ source $HOME/.config/fish/local.fish
+end
+
+#normal }}}
+
+# if status --is-interactive
+# command fortune -s | cowsay -n | lolcat
+# end
--- a/gitconfig Mon Jun 04 11:00:25 2012 -0400
+++ b/gitconfig Thu Jun 07 16:28:55 2012 -0400
@@ -11,9 +11,14 @@
tags = tag -l
branches = branch -a
remotes = remote -v
- l = log -16 --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset'
+
+ root = rev-parse --show-toplevel
+
+ graft = cherry-pick -x
+
+ l = log -18 --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset'
ll = log --color=always --all --topo-order --pretty='format:%Cgreen%h%Creset %s%Cred%d%Creset %C(black bold)(by %an)%Creset'
- gl = log -10 --color=always --all --graph --topo-order --pretty='format:%Cgreen%h%Creset %s %C(black bold)(by %an)%Creset%C(yellow bold)%d%Creset%n'
+ gl = log -12 --color=always --all --graph --topo-order --pretty='format:%Cgreen%h%Creset %s %C(black bold)(by %an)%Creset%C(yellow bold)%d%Creset%n'
gll = log --color=always --all --graph --topo-order --pretty='format:%Cgreen%h%Creset %s %C(black bold)(by %an)%Creset%C(yellow bold)%d%Creset%n'
pull = pull --ff-only
@@ -76,5 +81,6 @@
[mergetool "splice"]
cmd = "mvim -f $BASE $LOCAL $REMOTE $MERGED -c 'SpliceInit'"
trustExitCode = true
+
[web]
browser = open
--- a/keymando/keymandorc.rb Mon Jun 04 11:00:25 2012 -0400
+++ b/keymando/keymandorc.rb Thu Jun 07 16:28:55 2012 -0400
@@ -1,13 +1,13 @@
-# Basic ----------------------------------------------------------------------------
+# Basic -----------------------------------------------------------------------
start_at_login
disable "Remote Desktop Connection"
disable /VirtualBox/
map "<Ctrl-m>", "<Cmd-Shift-/>"
-map "<Ctrl-Shift-R>", lambda { reload() }
+# map "<Ctrl-Shift-R>", lambda { reload() }
-# Application Switching ------------------------------------------------------------
+# Application Switching -------------------------------------------------------
map "<Ctrl-Shift-J>", lambda { activate('Firefox') }
map "<Ctrl-Shift-P>", lambda { activate('Pixelmator') }
map "<Ctrl-Shift-H>", lambda { activate('Pixen') }
@@ -24,16 +24,21 @@
send('<Ctrl-f>1')
end
-# Leader ---------------------------------------------------------------------------
+# Refresh ---------------------------------------------------------------------
+
+map "<Ctrl-Shift-R>" do
+ activate('Firefox')
+ send("<Cmd-r>")
+ send("<Cmd-Tab>")
+end
+
+# Leader ----------------------------------------------------------------------
# map "<Ctrl-,>" do
# input()
# end
-# Abbreviations --------------------------------------------------------------------
+# Abbreviations ---------------------------------------------------------------
# abbrev 'ldis' do
-# pasteBoard = NSPasteboard.generalPasteboard
-# pasteBoard.declareTypes([NSStringPboardType], owner: nil)
-# pasteBoard.setString('ಠ_ಠ', forType: NSStringPboardType)
-# send('<Cmd-v>')
+# send('ಠ_ಠ')
# end
--- a/tmux/tmux.conf Mon Jun 04 11:00:25 2012 -0400
+++ b/tmux/tmux.conf Thu Jun 07 16:28:55 2012 -0400
@@ -15,6 +15,7 @@
# This is hilariously absurd. How many nerds use tmux on OS X every day and
# it's still fundamentally broken?
set -g default-command "reattach-to-user-namespace -l zsh"
+set -g default-command "reattach-to-user-namespace -l fish"
# Less stretching to get to the first item.
set -g base-index 1
--- a/vim/bundle/potion/syntax/potion.vim Mon Jun 04 11:00:25 2012 -0400
+++ b/vim/bundle/potion/syntax/potion.vim Thu Jun 07 16:28:55 2012 -0400
@@ -10,16 +10,16 @@
syntax match potionComment "\v#.*$"
+syntax match potionOperatorBar "\v\*"
syntax match potionOperator "\v\*\="
-syntax match potionOperator "\v/\="
-syntax match potionOperator "\v\+\="
-syntax match potionOperator "\v-\="
-syntax match potionOperator "\v\*"
-syntax match potionOperator "\v/"
-syntax match potionOperator "\v\+"
-syntax match potionOperator "\v-"
-syntax match potionOperator "\v\?"
-syntax match potionOperator "\v\="
+" syntax match potionOperator "\v/\="
+" syntax match potionOperator "\v\+\="
+" syntax match potionOperator "\v-\="
+" syntax match potionOperator "\v/"
+" syntax match potionOperator "\v\+"
+" syntax match potionOperator "\v-"
+" syntax match potionOperator "\v\?"
+" syntax match potionOperatorBaz "\v\="
syntax region potionString start=/\v"/ skip=/\v\\./ end=/\v"/
syntax region potionString start=/\v'/ skip=/\v\\./ end=/\v'/
--- a/vim/vimrc Mon Jun 04 11:00:25 2012 -0400
+++ b/vim/vimrc Thu Jun 07 16:28:55 2012 -0400
@@ -49,6 +49,9 @@
set spellfile=~/.vim/custom-dictionary.utf-8.add
set colorcolumn=+1
+" Don't try to highlight lines longer than 500 characters.
+set synmaxcol=500
+
" Time out on key codes but not mappings.
" Basically this makes terminal Vim work sanely.
set notimeout
@@ -227,11 +230,12 @@
" Unfuck my screen
nnoremap <leader>u :syntax sync fromstart<cr>:redraw!<cr>
-" System clipboard interaction
-" From https://github.com/henrik/dotfiles/blob/master/vim/config/mappings.vim
+" System clipboard interaction. Mostly from:
+" https://github.com/henrik/dotfiles/blob/master/vim/config/mappings.vim
noremap <leader>y "*y
noremap <leader>p :set paste<CR>"*p<CR>:set nopaste<CR>
noremap <leader>P :set paste<CR>"*P<CR>:set nopaste<CR>
+vnoremap <leader>y "*ygv
" I constantly hit "u" in visual mode when I mean to "y". Use "gu" for those rare occasions.
" From https://github.com/henrik/dotfiles/blob/master/vim/config/mappings.vim
@@ -260,9 +264,6 @@
" Send visual selection to paste.stevelosh.com
vnoremap <c-p> :w !curl -sF 'sprunge=<-' 'http://paste.stevelosh.com' \| tr -d '\n ' \| pbcopy && open `pbpaste`<cr>
-" Make backspace work sanely in visual mode
-vnoremap <bs> x
-
" Insert the directory of the current buffer in command line mode
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
@@ -379,6 +380,7 @@
" Quick editing {{{
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
+nnoremap <leader>ef :vsplit ~/.config/fish/config.fish<cr>
nnoremap <leader>es :vsplit ~/.vim/snippets/<cr>
nnoremap <leader>ed :vsplit ~/.vim/custom-dictionary.utf-8.add<cr>
nnoremap <leader>eo :vsplit ~/Dropbox/Org<cr>4j
@@ -422,6 +424,9 @@
" Don't move on *
nnoremap * *<c-o>
+" Use c-\ to do c-] but open it in a new split.
+nnoremap <c-\> <c-w>v<c-]>zvzz
+
" Keep search matches in the middle of the window.
nnoremap n nzzzv
nnoremap N Nzzzv
@@ -692,6 +697,8 @@
au!
au BufNewFile,BufRead *.fish setlocal filetype=fish
+
+ au FileType fish setlocal foldmethod=marker foldmarker={{{,}}}
augroup END
" }}}
@@ -953,6 +960,7 @@
au FileType htmldjango setlocal commentstring={#\ %s\ #}
au FileType clojurescript setlocal commentstring=;\ %s
au FileType puppet setlocal commentstring=#\ %s
+ au FileType fish setlocal commentstring=#\ %s
augroup END
" }}}
@@ -1574,6 +1582,9 @@
nnoremap <silent> <leader>A :set opfunc=<SID>AckMotion<CR>g@
xnoremap <silent> <leader>A :<C-U>call <SID>AckMotion(visualmode())<CR>
+nnoremap <bs> :Ack! '\b<c-r><c-w>\b'<cr>
+xnoremap <silent> <bs> :<C-U>call <SID>AckMotion(visualmode())<CR>
+
function! s:CopyMotionForType(type)
if a:type ==# 'v'
silent execute "normal! `<" . a:type . "`>y"