Permalink
Browse files

moar

--HG--
rename : config/fish/config.fish => fish/config.fish
  • Loading branch information...
1 parent dc35450 commit b9cde54024675e0c277512195c30a6ed70fe2326 @sjl committed Jun 7, 2012
Showing with 244 additions and 89 deletions.
  1. +0 −64 config/fish/config.fish
  2. +196 −0 fish/config.fish
  3. +8 −2 gitconfig
  4. +14 −9 keymando/keymandorc.rb
  5. +1 −0 tmux/tmux.conf
  6. +9 −9 vim/bundle/potion/syntax/potion.vim
  7. +16 −5 vim/vimrc
View
@@ -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
View
@@ -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
View
@@ -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
View
@@ -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
View
@@ -15,6 +15,7 @@ setw -g mouse-select-pane on
# 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"
@teoljungberg

teoljungberg Jul 11, 2012

You can remove the redundancy by just having
set -g default-command "reattach-to-user-namespace -l $SHELL"
instead of having one line for fish and one for zsh

# Less stretching to get to the first item.
set -g base-index 1
@@ -10,16 +10,16 @@ syntax keyword potionFunction print join string
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'/
Oops, something went wrong.

0 comments on commit b9cde54

Please sign in to comment.