# HG changeset patch # User Steve Losh # Date 1308104875 14400 # Node ID f1808d07caa01a84acc6c67cd6207426d1637e1c # Parent 47bf5a91934df27ebc1ac044e26376d7031e0d3e# Parent c40bb62b5c77722cdf9b6983593ff1053e70e6c5 Merge. diff -r c40bb62b5c77 -r f1808d07caa0 .gitconfig --- a/.gitconfig Tue May 31 18:47:34 2011 -0400 +++ b/.gitconfig Tue Jun 14 22:27:55 2011 -0400 @@ -37,3 +37,10 @@ [diff] tool = Kaleidoscope + +[merge] +tool = threesome + +[mergetool "threesome"] +cmd = "mvim -f $BASE $LOCAL $REMOTE $MERGED -c 'ThreesomeInit'" +trustExitCode = true diff -r c40bb62b5c77 -r f1808d07caa0 .hgrc --- a/.hgrc Tue May 31 18:47:34 2011 -0400 +++ b/.hgrc Tue Jun 14 22:27:55 2011 -0400 @@ -46,6 +46,7 @@ dwd = ssh://hg@bitbucket.org/dwaiter/ nyh = ssh://sjl@gotham.nyhacker.org/ dl = ssh://hg@hg.dwaiter.com:38038/ +mirr = ssh://hg@dwaiter.com:38038/mirror/ [diff] git = True @@ -60,6 +61,10 @@ opts.dd = [merge-tools] +threesome.executable = mvim +threesome.args = -f $base $local $other $output -c 'ThreesomeInit' +threesome.premerge = keep +threesome.priority = 1 [email] method = smtp @@ -140,6 +145,8 @@ fet = fetch --message 'Automated merge.' qpp = push -r qparent +gl = glog -l10 --template='\033[0;33m{rev}\033[0m {desc|firstline|strip} \033[0;35m{branches}\033[0m \033[0;33m{tags}\033[0m\n\033[1;30m({date|age} by {author|person})\033[0m\n\n' + # Make a new repo with some sensible defaults. mkrepo = !$HG init $1 && cd $1 && \ echo 'syntax: glob' > .hgignore && \ @@ -201,6 +208,23 @@ # Show in MacVim vshow = !$HG show $@ | mvim -c ':AnsiEsc' -c 'setlocal buftype=nofile' - -# Update subrepos -subpull = !grep = "`$HG root`/.hgsub" | cut -d' ' -f1 | xargs -n 1 -I SUB hg pull --cwd "`$HG root`/SUB" -subup = !grep = "`$HG root`/.hgsub" | cut -d' ' -f1 | xargs -n 1 -I SUB hg update --cwd "`$HG root`/SUB" +# Run commands on all subrepos at once. +subs = !"$HG" debugsub | grep '^path' | cut -d' ' -f2 | xargs -n1 -I SUB $HG -R "`$HG root`/SUB" $@ +psubs = !"$HG" debugsub | grep '^path' | cut -d' ' -f2 | parallel -j10 -I SUB $HG -R "`$HG root`/SUB" $@ + +# Run a command on a subrepo: +# +# hg sub SUBREPO_REGEX ...command and arguments... +# +# The SUBREPO_REGEX should be a regex that will let grep match one and only one of +# the subrepos in .hgsub. For example: +# +# $ cat .hgsub +# bundled/foo = ... +# bundled/bar = ... +# +# $ hg sub fo root +# .../bundled/foo +# $ hg sub ar status -m +# M lol.py +sub = !grep = "`$HG root`/.hgsub" | cut -d' ' -f1 | grep "$1" | tr -d '\n ' | xargs -0 -I SUB $HG -R SUB $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 diff -r c40bb62b5c77 -r f1808d07caa0 .hgsub --- a/.hgsub Tue May 31 18:47:34 2011 -0400 +++ b/.hgsub Tue Jun 14 22:27:55 2011 -0400 @@ -15,5 +15,6 @@ vim/bundle/pydoc = [git]git://github.com/fs111/pydoc.vim.git vim/bundle/tasklist = [git]git://github.com/vim-scripts/TaskList.vim.git vim/bundle/command-t = [git]git://github.com/vim-scripts/Command-T.git -vim/bundle/utl = [git]git://github.com/vim-scripts/utl.vim.git vim/bundle/vim-orgmode = [git]git://github.com/sjl/vim-orgmode.git +vim/bundle/slimv = [hg]http://bitbucket.org/kovisoft/slimv +vim/bundle/threesome = [hg]http://bitbucket.org/sjl/threesome.vim diff -r c40bb62b5c77 -r f1808d07caa0 .hgsubstate --- a/.hgsubstate Tue May 31 18:47:34 2011 -0400 +++ b/.hgsubstate Tue Jun 14 22:27:55 2011 -0400 @@ -2,18 +2,19 @@ b6be751b4b4391e7e25ba51e36300a8e04820846 vim/bundle/ack bfdf714f8ea10a6bcba7a1375a5700b11077dcd9 vim/bundle/command-t 24c9f6c5974d1838a2e1db8c58bf4160298433a2 vim/bundle/easymotion -93b8bc15d06b489433afe8c874cd36b6bbcaee8f vim/bundle/gundo +0a6df52ad402a3ea63c06bb46ff5fa2c861fbed7 vim/bundle/gundo 1535425d6987812aa87e2123d0e509b847b893d5 vim/bundle/html5 34e28b3f6f6d702ff2963b8196eccae9344ed4bc vim/bundle/markdown 930be32a23e902ddc46135ddbb9e76b0fac0c14b vim/bundle/nerdcommenter 7650cdc6621cd15b047dc04605b8b0bc0396564d vim/bundle/nerdtree 56c23972ad6de20e558ec7806371042529f0a41e vim/bundle/pydoc +216cdfbaf8f02ee28b99ca743d3b90d945a5edf8 vim/bundle/slimv c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup 6eec2c131213850ed65fd6da494dfd1a0d620a4e vim/bundle/strftimedammit 27710a2224d6dd0486d1c40d09ef18dd752e7d37 vim/bundle/surround 60731769663ea23b4763f3f0034da445ebcd3ddd vim/bundle/syntastic 8e2dfdcc6e13d8afab5b3f620ee06ebb29b786f9 vim/bundle/tasklist -67a6506a7a8a3847d00d3af3e2ed9707460d5ce5 vim/bundle/utl +4995b244e11d5aaa9956bba061c32140e6af8705 vim/bundle/threesome b9b4407a19acc4eb344cca0cc5beea75e9ff5491 vim/bundle/vim-coffee-script c2df2e430d7d5fe645aa40e36079ab51f082e06b vim/bundle/vim-javascript 3d1692f635579e718b85dd8f24ac7fbd52a444f6 vim/bundle/vim-orgmode diff -r c40bb62b5c77 -r f1808d07caa0 .zshrc --- a/.zshrc Tue May 31 18:47:34 2011 -0400 +++ b/.zshrc Tue Jun 14 22:27:55 2011 -0400 @@ -2,7 +2,7 @@ export ZSH_THEME="prose" export DISABLE_AUTO_UPDATE="true" export OH_MY_ZSH_DEBUG="true" -plugins=(command-coloring pip fabric) +plugins=(command-coloring pip fabric lein redis-cli vagrant) #test -f "$HOME/src/hgd/hd" && export OH_MY_ZSH_HG="$HOME/src/hgd/hd" || export OH_MY_ZSH_HG='hg' diff -r c40bb62b5c77 -r f1808d07caa0 vim/.vimrc --- a/vim/.vimrc Tue May 31 18:47:34 2011 -0400 +++ b/vim/.vimrc Tue Jun 14 22:27:55 2011 -0400 @@ -49,6 +49,9 @@ " Save when losing focus au FocusLost * :wa +" Resize splits when the window is resized +au VimResized * exe "normal! \=" + " Tabs, spaces, wrapping {{{ set tabstop=4 @@ -233,12 +236,9 @@ " }}} " Various filetype-specific stuff --------------------------------------------- {{{ -" Cram {{{ +" C {{{ -au BufNewFile,BufRead *.t set filetype=cram - -let cram_fold=1 -autocmd Syntax cram setlocal foldlevel=1 +au FileType c setlocal foldmethod=syntax " }}} " Clojure {{{ @@ -249,47 +249,20 @@ au FileType clojure nmap ee 0;\et " }}} -" C {{{ +" Confluence {{{ -au FileType c setlocal foldmethod=syntax +au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki + +" Wiki pages should be soft-wrapped. +au FileType confluencewiki setlocal wrap linebreak nolist " }}} -" HTML and HTMLDjango {{{ - -au BufNewFile,BufRead *.html setlocal filetype=htmldjango -au BufNewFile,BufRead *.html setlocal foldmethod=manual - -" Use f to fold the current tag. -au BufNewFile,BufRead *.html nnoremap f Vatzf -au BufNewFile,BufRead *.html nnoremap VV vatV +" Cram {{{ -" Use Shift-Return to turn this: -" | -" -" into this: -" -" | -" -au BufNewFile,BufRead *.html inoremap kA -au BufNewFile,BufRead *.html nnoremap vitavitoi +au BufNewFile,BufRead *.t set filetype=cram -" Sparkup mappings: -" -" to expand sparkup normally: -"

|

-" -" to force an expanded sparkup. -"

-" | -"

-au BufNewFile,BufRead *.html imap -au BufNewFile,BufRead *.html imap . - -" Django tags -au FileType jinja,htmldjango inoremap {%%} - -" Django variables -au FileType jinja,htmldjango inoremap {{}} +let cram_fold=1 +autocmd Syntax cram setlocal foldlevel=1 " }}} " CSS and LessCSS {{{ @@ -335,49 +308,6 @@ au BufNewFile,BufRead *.less inoremap { {}.kA " }}} -" Javascript {{{ - -au FileType javascript setlocal foldmethod=marker -au FileType javascript setlocal foldmarker={,} - -" }}} -" Confluence {{{ - -au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki - -" Wiki pages should be soft-wrapped. -au FileType confluencewiki setlocal wrap linebreak nolist - -" }}} -" Fish {{{ - -au BufNewFile,BufRead *.fish setlocal filetype=fish - -" }}} -" Markdown {{{ - -au BufNewFile,BufRead *.m*down setlocal filetype=markdown - -" Use 1/2/3 to add headings. -au Filetype markdown nnoremap 1 yypVr= -au Filetype markdown nnoremap 2 yypVr- -au Filetype markdown nnoremap 3 I### - -" }}} -" Vim {{{ - -au FileType vim setlocal foldmethod=marker -au FileType help setlocal textwidth=78 - -" }}} -" Python {{{ - -au Filetype python noremap rr :RopeRename -au Filetype python vnoremap rm :RopeExtractMethod -au Filetype python noremap ri :RopeOrganizeImports -au FileType python setlocal omnifunc=pythoncomplete#Complete - -" }}} " Django {{{ au BufNewFile,BufRead urls.py setlocal nowrap @@ -391,6 +321,77 @@ au BufNewFile,BufRead settings.py setlocal filetype=python.django au BufNewFile,BufRead settings.py setlocal foldmethod=marker au BufNewFile,BufRead forms.py setlocal filetype=python.django +au BufNewFile,BufRead common_settings.py setlocal filetype=python.django +au BufNewFile,BufRead common_settings.py setlocal foldmethod=marker + +" }}} +" Firefox {{{ + +au BufRead,BufNewFile ~/Library/Caches/* setlocal buftype=nofile + +" }}} +" Fish {{{ + +au BufNewFile,BufRead *.fish setlocal filetype=fish + +" }}} +" HTML and HTMLDjango {{{ + +au BufNewFile,BufRead *.html setlocal filetype=htmldjango +au BufNewFile,BufRead *.html setlocal foldmethod=manual + +" Use f to fold the current tag. +au BufNewFile,BufRead *.html nnoremap f Vatzf +au BufNewFile,BufRead *.html nnoremap VV vatV + +" Use Shift-Return to turn this: +" | +" +" into this: +" +" | +" +au BufNewFile,BufRead *.html inoremap kA +au BufNewFile,BufRead *.html nnoremap vitavitoi + +" Sparkup mappings: +" +" to expand sparkup normally: +"

|

+" +" to force an expanded sparkup. +"

+" | +"

+au BufNewFile,BufRead *.html imap +au BufNewFile,BufRead *.html imap . + +" Django tags +au FileType jinja,htmldjango inoremap {%%} + +" Django variables +au FileType jinja,htmldjango inoremap {{}} + +" }}} +" Javascript {{{ + +au FileType javascript setlocal foldmethod=marker +au FileType javascript setlocal foldmarker={,} + +" }}} +" Lisp {{{ + +au FileType lisp call TurnOnLispFolding() + +" }}} +" Markdown {{{ + +au BufNewFile,BufRead *.m*down setlocal filetype=markdown + +" Use 1/2/3 to add headings. +au Filetype markdown nnoremap 1 yypVr= +au Filetype markdown nnoremap 2 yypVr- +au Filetype markdown nnoremap 3 I### " }}} " Nginx {{{ @@ -405,20 +406,18 @@ au BufNewFile,BufRead .pentadactylrc set filetype=pentadactyl " }}} -" Vagrant {{{ - -au BufRead,BufNewFile Vagrantfile set ft=ruby - -" }}} " Puppet {{{ au Filetype puppet setlocal foldmethod=marker au Filetype puppet setlocal foldmarker={,} " }}} -" Firefox {{{ +" Python {{{ -au BufRead,BufNewFile ~/Library/Caches/* setlocal buftype=nofile +au Filetype python noremap rr :RopeRename +au Filetype python vnoremap rm :RopeExtractMethod +au Filetype python noremap ri :RopeOrganizeImports +au FileType python setlocal omnifunc=pythoncomplete#Complete " }}} " ReStructuredText {{{ @@ -429,6 +428,24 @@ au Filetype rst nnoremap 4 yypVr` " }}} +" Vagrant {{{ + +au BufRead,BufNewFile Vagrantfile set ft=ruby + +" }}} +" Vim {{{ + +au FileType vim setlocal foldmethod=marker +au FileType help setlocal textwidth=78 + +" }}} + +" }}} +" Quick editing --------------------------------------------------------------- {{{ + +nnoremap ev sjL:e $MYVIMRC +nnoremap es sjL:e ~/.vim/snippets/ +nnoremap eo sjL:e ~/Dropbox/Org4j " }}} " Convenience mappings -------------------------------------------------------- {{{ @@ -472,10 +489,6 @@ " Rainbows! nmap R :RainbowParenthesesToggle -" Edit vim stuff -nnoremap ev sjL:e $MYVIMRC -nnoremap es sjL:e ~/.vim/snippets/ - " Sudo to write cmap w!! w !sudo tee % >/dev/null @@ -610,9 +623,9 @@ " }}} " OrgMode {{{ -let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure', '|', 'Todo', 'Misc'] +let g:org_plugins = ['ShowHide', '|', 'Navigator', 'EditStructure', '|', 'Todo', 'Date', 'Misc'] -let g:org_todo_keywords = ['TODO', 'HOLD', '|', 'DONE'] +let g:org_todo_keywords = ['TODO', '|', 'DONE'] let g:org_debug = 1 " }}} " DirDiff {{{ @@ -621,6 +634,49 @@ map Dj DirDiffNext map Dk DirDiffPrev " }}} +" SLIMV {{{ + +" First check if SWANK is bundled with Slimv +let swanks = split( globpath( &runtimepath, 'slime/start-swank.lisp'), '\n' ) + +if len( swanks ) == 0 + " Try to find SWANK in the standard SLIME installation locations + if g:slimv_windows || g:slimv_cygwin + let swanks = split( globpath( 'c:/slime/,c:/*lisp*/slime/,c:/*lisp*/site/lisp/slime/,c:/Program Files/*lisp*/site/lisp/slime/', 'start-swank.lisp' ), '\n' ) + else + let swanks = split( globpath( '/usr/share/common-lisp/source/slime/', 'start-swank.lisp' ), '\n' ) + endif +endif + +if len( swanks ) != 0 + let g:slimv_swank_cmd = '! dtach -n /tmp/swank.socket sbcl --load "' . swanks[0] . '"' + let g:slimv_swank_cmd = '! dtach -n /tmp/swank.socket clisp -i "' . swanks[0] . '"' +endif + + +" }}}} +" Threesome {{{ + +let g:threesome_initial_mode = "grid" + +let g:threesome_initial_layout_grid = 0 +let g:threesome_initial_layout_loupe = 0 +let g:threesome_initial_layout_compare = 0 +let g:threesome_initial_layout_path = 0 + +let g:threesome_initial_diff_grid = 0 +let g:threesome_initial_diff_loupe = 0 +let g:threesome_initial_diff_compare = 0 +let g:threesome_initial_diff_path = 0 + +let g:threesome_initial_scrollbind_grid = 0 +let g:threesome_initial_scrollbind_loupe = 0 +let g:threesome_initial_scrollbind_compare = 0 +let g:threesome_initial_scrollbind_path = 0 + +let g:threesome_wrap = "nowrap" + +" }}} " }}} " Synstack -------------------------------------------------------------------- {{{ diff -r c40bb62b5c77 -r f1808d07caa0 vim/ftplugin/lisp/lispfolding.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/ftplugin/lisp/lispfolding.vim Tue Jun 14 22:27:55 2011 -0400 @@ -0,0 +1,43 @@ +if exists('loaded_lispfolding') || &cp + finish +endif +let loaded_lispfolding=1 + +" --------------------------------------------------------------------------- +" Automagic Lisp folding on defn's and defmacro's +" +function GetLispFold() + if getline(v:lnum) =~ '^\s*(defun.*\s' + return ">1" + elseif getline(v:lnum) =~ '^\s*(defmacro.*\s' + return ">1" + elseif getline(v:lnum) =~ '^\s*(defparameter.*\s' + return ">1" + elseif getline(v:lnum) =~ '^\s*$' + let my_lispnum = v:lnum + let my_lispmax = line("$") + + while (1) + let my_lispnum = my_lispnum + 1 + if my_lispnum > my_lispmax + return "<1" + endif + + let my_lispdata = getline(my_lispnum) + + " If we match an empty line, stop folding + if my_lispdata =~ '^$' + return "<1" + else + return "=" + endif + endwhile + else + return "=" + endif +endfunction + +function TurnOnLispFolding() + setlocal foldexpr=GetLispFold() + setlocal foldmethod=expr +endfunction diff -r c40bb62b5c77 -r f1808d07caa0 zsh/misc.zsh --- a/zsh/misc.zsh Tue May 31 18:47:34 2011 -0400 +++ b/zsh/misc.zsh Tue Jun 14 22:27:55 2011 -0400 @@ -3,13 +3,17 @@ alias m='mvim .' -alias v='vagrant' alias f='fab' alias fd='fab dev' alias spotlight-off='sudo mdutil -a -i off && sudo mv /System/Library/CoreServices/Search.bundle/ /System/Library/CoreServices/SearchOff.bundle/ && killall SystemUIServer' alias spotlight-on='sudo mdutil -a -i on && sudo mv /System/Library/CoreServices/SearchOff.bundle/ /System/Library/CoreServices/Search.bundle/ && killall SystemUIServer' +alias mutt='cd ~/Desktop; mutt' +alias hi='pygmentize' + +function gimmeurjson() { curl "$*" | python -mjson.tool | pygmentize -l javascript; } + function mdown () { (echo ' @@ -79,5 +83,7 @@ done } -alias dvt='dvtm -m "^f"' -alias dv='dtach -A /tmp/dvtm-session.sock -r winch dvtm -m "^f"' +alias dv='dvtm -m "^f"' +alias dvt='dtach -A /tmp/dvtm-session.sock -r winch dvtm -m "^f"' + +alias goawayswapfilesyouareswapfilesidontevenneedyou='rm ~/.vim/tmp/swap/*' diff -r c40bb62b5c77 -r f1808d07caa0 zsh/vagrant.zsh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zsh/vagrant.zsh Tue Jun 14 22:27:55 2011 -0400 @@ -0,0 +1,9 @@ +alias v='vagrant' +alias vs='vagrant suspend' +alias vu='vagrant up' +alias vh='vagrant halt' +alias vss='vagrant ssh' + +function turnoffthedamnboxvagrant () { + VBoxManage list vms | grep "$1" | cut -d' ' -f1 | tr -d '"\n ' | xargs -0 -I BOX VBoxManage controlvm BOX poweroff +}