# HG changeset patch # User Steve Losh # Date 1294894974 18000 # Node ID cffc630cdd07eae508016ed05ffe116f8c195cb8 # Parent 43e9e87b01201c143789233c9252b2cc7d3469e1# Parent 82f8794f28c78607d63df1aa878313127ca06070 Merge. diff -r 43e9e87b0120 -r cffc630cdd07 .gitconfig --- a/.gitconfig Thu Jan 13 00:02:40 2011 -0500 +++ b/.gitconfig Thu Jan 13 00:02:54 2011 -0500 @@ -10,6 +10,8 @@ gl = log -10 --color=always --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n' gll = log --color=always --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n' +pull = pull --ff-only + com = commit cm = commit -m diff -r 43e9e87b0120 -r cffc630cdd07 .hgignore --- a/.hgignore Thu Jan 13 00:02:40 2011 -0500 +++ b/.hgignore Thu Jan 13 00:02:54 2011 -0500 @@ -15,3 +15,5 @@ mutt/temp mutt/cache vim/spell +fishd* +fish_history diff -r 43e9e87b0120 -r cffc630cdd07 .hgrc --- a/.hgrc Thu Jan 13 00:02:40 2011 -0500 +++ b/.hgrc Thu Jan 13 00:02:54 2011 -0500 @@ -54,10 +54,6 @@ opts.dd = [merge-tools] -diffuse.priority=-3 -diffuse.args=$local $base $other -diffuse.gui=True -diffuse.diffargs=$parent $child [email] method = smtp diff -r 43e9e87b0120 -r cffc630cdd07 config/fish/config.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/fish/config.fish Thu Jan 13 00:02:54 2011 -0500 @@ -0,0 +1,53 @@ +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 .' + +# Environment variables ------------------------------------------------------ +set -g EDITOR vim +set -g PATH "$HOME/.gem/ruby/1.8/bin:$PATH" +set -g PATH "/usr/local/bin:/usr/local/sbin:$HOME/bin:/opt/local/bin:$PATH" +set -g PATH "/opt/subversion/bin:$PATH" +set -g COMMAND_MODE unix2003 +set -g RUBYOPT rubygems +set -g CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar" + +# Python variables ----------------------------------------------------------- +set -g PIP_DOWNLOAD_CACHE "$HOME/.pip/cache" +set -g PYTHONSTARTUP "$HOME/.pythonrc.py" +set -g WORKON_HOME "$HOME/lib/virtualenvs" + +set -g PATH "$PATH:/usr/local/Cellar/PyPi/3.6/bin" +set -g PATH "$PATH:/usr/local/Cellar/python/2.7.1/bin" +set -g PATH "$PATH:/usr/local/Cellar/python/2.7/bin" +set -g PATH "$PATH:/usr/local/Cellar/python/2.6.5/bin" + +set -g PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7.1/site-packages" +set -g PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7/site-packages" +set -g PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.6/site-packages" +set -g PYTHONPATH "$HOME/lib/python/see:$PYTHONPATH" + +# Mercurial variables -------------------------------------------------------- +set -g PATH="$HOME/lib/hg/hg-stable:$PATH" +set -g PYTHONPATH="$HOME/lib/hg/hg-stable:$PYTHONPATH" + +# Extra ---------------------------------------------------------------------- +. ~/src/z-fish/z.sh + +# 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 diff -r 43e9e87b0120 -r cffc630cdd07 config/pianobar/config --- a/config/pianobar/config Thu Jan 13 00:02:40 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -user = steve@stevelosh.com -history = 10 -audio_format = aacplus -download_dir = /Users/sjl/Desktop diff -r 43e9e87b0120 -r cffc630cdd07 vim/.vimrc --- a/vim/.vimrc Thu Jan 13 00:02:40 2011 -0500 +++ b/vim/.vimrc Thu Jan 13 00:02:54 2011 -0500 @@ -113,7 +113,6 @@ set foldlevelstart=0 nnoremap za vnoremap za -noremap ft Vatzf function! MyFoldText() let line = getline(v:foldstart) @@ -135,27 +134,44 @@ " Fuck you, help key. set fuoptions=maxvert,maxhorz inoremap :set invfullscreena -nnoremap :set invfullscreen -vnoremap :set invfullscreen +noremap :set invfullscreen " Fuck you too, manual key nnoremap K -" Various syntax stuff -au BufNewFile,BufRead *.less set filetype=less -au BufRead,BufNewFile *.scss set filetype=scss +" Various filetype-specific stuff + +au BufNewFile,BufRead *.html setlocal filetype=htmldjango +au BufNewFile,BufRead *.html setlocal foldmethod=manual +au BufNewFile,BufRead *.html nnoremap f Vatzf -au BufRead,BufNewFile *.confluencewiki set filetype=confluencewiki -au BufRead,BufNewFile *.confluencewiki set wrap linebreak nolist +au BufNewFile,BufRead *.less setlocal filetype=less +au BufNewFile,BufRead *.less setlocal foldmethod=marker +au BufNewFile,BufRead *.less setlocal foldmarker={,} +au BufNewFile,BufRead *.less setlocal nocursorline + +au BufNewFile,BufRead *.js setlocal foldmethod=marker +au BufNewFile,BufRead *.js setlocal foldmarker={,} + +au BufRead,BufNewFile *.confluencewiki setlocal filetype=confluencewiki +au BufRead,BufNewFile *.confluencewiki setlocal wrap linebreak nolist + +au BufNewFile,BufRead *.fish set filetype=fish au BufNewFile,BufRead *.m*down set filetype=markdown -au BufNewFile,BufRead *.m*down nnoremap 1 yypVr= -au BufNewFile,BufRead *.m*down nnoremap 2 yypVr- -au BufNewFile,BufRead *.m*down nnoremap 3 I### +au BufNewFile,BufRead *.m*down nnoremap 1 yypVr= +au BufNewFile,BufRead *.m*down nnoremap 2 yypVr- +au BufNewFile,BufRead *.m*down nnoremap 3 I### + +au BufNewFile,BufRead *.vim setlocal foldmethod=marker -au BufNewFile,BufRead *.vim set foldmethod=marker +au BufNewFile,BufRead urls.py setlocal nowrap +au BufNewFile,BufRead settings.py normal! zR +au BufNewFile,BufRead dashboard.py normal! zR -au BufNewFile,BufRead urls.py set nowrap +au BufRead,BufNewFile /etc/nginx/conf/* set ft=nginx +au BufRead,BufNewFile /etc/nginx/sites-available/* set ft=nginx +au BufRead,BufNewFile /usr/local/etc/nginx/sites-available/* set ft=nginx autocmd FileType clojure call TurnOnClojureFolding() @@ -181,23 +197,9 @@ au BufNewFile,BufRead *.js set errorformat=%-P-----\ FILE\ \ :\ \ %f\ -----,Line\ %l\\,\ E:%n:\ %m,%-Q,%-GFound\ %s,%-GSome\ %s,%-Gfixjsstyle%s,%-Gscript\ can\ %s,%-G " TESTING GOAT APPROVES OF THESE LINES -au BufNewFile,BufRead test_*.py set makeprg=nosetests\ --machine-out\ --nocapture -au BufNewFile,BufRead test_*.py set shellpipe=2>&1\ >/dev/null\ \|\ tee -au BufNewFile,BufRead test_*.py set errorformat=%f:%l:\ %m -au BufNewFile,BufRead test_*.py nmap N :make nmap fn :cn nmap fp :cp -" TODO: Put this in filetype-specific files -au BufNewFile,BufRead *.less set foldmethod=marker -au BufNewFile,BufRead *.less set foldmarker={,} -au BufNewFile,BufRead *.less set nocursorline -au BufRead,BufNewFile /etc/nginx/conf/* set ft=nginx -au BufRead,BufNewFile /etc/nginx/sites-available/* set ft=nginx -au BufRead,BufNewFile /usr/local/etc/nginx/sites-available/* set ft=nginx -au BufNewFile,BufRead *.js set foldmethod=marker -au BufNewFile,BufRead *.js set foldmarker={,} - " Easier linewise reselection map v V`] @@ -219,9 +221,6 @@ nnoremap Vit vitVkoj nnoremap Vat vatV -" Diff -nmap d :!hg diff % - " Rainbows! nmap R :RainbowParenthesesToggle @@ -383,6 +382,56 @@ omap i∑ CamelCaseMotion_iw xmap i∑ CamelCaseMotion_iw +" Diff +let g:HgDiffing = 0 +function! s:HgDiffCurrentFile() + if g:HgDiffing == 1 + if bufwinnr(bufnr('__HGDIFF__')) != -1 + exe bufwinnr(bufnr('__HGDIFF__')) . "wincmd w" + bdelete + endif + + diffoff! + + let g:HgDiffing = 0 + + return + endif + + let fname = bufname('%') + let ftype = &ft + diffthis + + vnew __HGDIFF__ + + setlocal buftype=nofile + setlocal bufhidden=hide + setlocal noswapfile + setlocal nobuflisted + exec 'setlocal filetype='.ftype + + setlocal modifiable + + silent normal! ggdG + silent exec ':r!hg cat ' . fname + silent normal! ggdd + + setlocal nomodifiable + + diffthis + + wincmd l + + let g:HgDiffing = 1 + + return +endfunction + +command! HgDiffCurrent call s:HgDiffCurrentFile() + +nmap d :HgDiffCurrent + +" MacVim if has('gui_running') set guifont=Menlo:h12 @@ -400,6 +449,9 @@ let g:sparkupExecuteMapping = '' highlight SpellBad term=underline gui=undercurl guisp=Orange + + inoremenu &Plugin.QuickCursor.CloseBuffer :w:BufClose + nnoremenu &Plugin.QuickCursor.CloseBuffer :w:BufClose else set nocursorline endif diff -r 43e9e87b0120 -r cffc630cdd07 vim/plugin/BufClose.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/plugin/BufClose.vim Thu Jan 13 00:02:54 2011 -0500 @@ -0,0 +1,98 @@ +" BufClose.vim - Close a buffer without closing the window it's in. +" +" Copyright February 2003 by Christian J. Robinson +" +" Distributed under the terms of the Vim license. See ":help license". + +" Usage: +" +" :BufClose[!] [buffer] +" +" Without any arguments the current buffer in the current window is closed. +" With an argument that buffer is closed if it exists and is currently being +" displayed in a window. +" +" The buffer argument can be a buffer name or number. +" +" In both cases if the buffer is modified you have to use ! or an error will +" be issued and the buffer will be left loaded. +" +" Configuration: +" +" g:BufClose_AltBuffer +" +" Set this variable if you don't want a blank buffer to be loaded in place of +" the buffer being closed. Examples: +" +" :let g:BufClose_AltBuffer = '#' +" +" This will cause :BufClose to load the alternate buffer. See ":help :_#". +" +" :let g:BufClose_AltBuffer = '.' +" +" This will cause :BufClose to load the current directory in the file +" explorer. + +command! -nargs=? -complete=buffer -bang BufClose + \ :call BufClose(expand(''), expand('')) + +function! BufClose(buffer, bang) + if a:buffer == '' + " No buffer provided, use current buffer in the current window. + let buffer = bufnr('%') + elseif (a:buffer + 0) > 0 + " A buffer number was provided. + let buffer = bufnr(a:buffer + 0) + else + " A buffer name was provided. + let buffer = bufnr(a:buffer) + endif + + if buffer == -1 + echohl ErrorMsg + echomsg "No matching buffer for" a:buffer + echohl None + return + endif + + let current_window = winnr() + let buffer_window = bufwinnr(buffer) + + if buffer_window == -1 + echohl ErrorMsg + echomsg "Buffer" buffer "isn't open in any windows." + echohl None + return + endif + + if a:bang == '' && getbufvar(buffer, '&modified') + echohl ErrorMsg + echomsg 'No write since last change for buffer' + \ buffer '(add ! to override)' + echohl None + return + endif + + " Move to the proper window if necessary, open a blank buffer, + " then move back to the original window... + if buffer_window >= 0 + if current_window == buffer_window + if exists('g:BufClose_AltBuffer') + exe 'e' . a:bang . ' ' . g:BufClose_AltBuffer + else + exe 'enew' . a:bang + endif + else + exe 'norm ' . buffer_window . "\w" + if exists('g:BufClose_AltBuffer') + exe 'e' . a:bang . ' ' . g:BufClose_AltBuffer + else + exe 'enew' . a:bang + endif + exe 'norm ' . current_window . "\w" + endif + endif + + " ...and delete the specified buffer. + silent exe 'bdel' . a:bang . ' ' . buffer +endfunction diff -r 43e9e87b0120 -r cffc630cdd07 vim/snippets/javascript.snippets --- a/vim/snippets/javascript.snippets Thu Jan 13 00:02:40 2011 -0500 +++ b/vim/snippets/javascript.snippets Thu Jan 13 00:02:54 2011 -0500 @@ -72,3 +72,5 @@ # Get Element snippet gett getElementBy${1:Id}('${2}')${3} +snippet log + console.log(${1});${2} diff -r 43e9e87b0120 -r cffc630cdd07 vim/syntax/fish.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/syntax/fish.vim Thu Jan 13 00:02:54 2011 -0500 @@ -0,0 +1,138 @@ +" Vim syntax file +" Language: fish +" Maintainer: yann monclair +" Heavily based on zsh.vim by Felix von Leitner +" there is still much work to be done, this is just a start, it should get +" better with time +" Url: http://monclair.info/~yann/vim +" Last Change: 2005/11/08 + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match fishSpecial "\\\d\d\d\|\\[abcfnrtv\\']" +syn region fishSinglequote start=+'+ skip=+\\'+ end=+'+ +" A bunch of useful fish keywords +syn keyword fishFunction function +syn keyword fishStatement . and bg begin bind break builtin +syn keyword fishStatement case cd command commandline complete continue count +syn keyword fishStatement dirh dirs end else eval exec exit +syn keyword fishStatement fg fishd for function functions +syn keyword fishStatement help if jobs mimedb nextd not or +syn keyword fishStatement popd prevd pushd random return read +syn keyword fishStatement set set_color switch tokenize +syn keyword fishStatement ulimit umask while +syn keyword fishInputrc backward-char backward-delete-char backward-kill-line backward-kill-word backward-word +syn keyword fishInputrc beginning-of-history beginning-of-line complete delete-char delete-line +syn keyword fishInputrc explain forward-char forward-word history-search-backward history-search-forward +syn keyword fishInputrc kill-line kill-whole-line kill-word yank yank-pop + +syn keyword fishConditional if else case then in +syn keyword fishRepeat while for done + + +" Following is worth to notice: command substitution, file redirection and functions (so these features turns red) +syn match fishFunctionName "\h\w*\s*()" +syn region fishshCommandSub start=+(+ end=+)+ contains=ALLBUT,fishFunction +syn match fishRedir "\d\=\(<\|<<\|>\|>>\)\(|\|&\d\)\=" + +syn keyword fishColors black red green brown yellow blue magenta purple cyan white normal + +syn keyword fishSpecialCommands fish_on_exit fish_on_exec fish_on_return + +syn keyword fishTodo contained TODO + +syn keyword fishVariables fish_prompt fish_title history status _ umask +syn keyword fishShellVariables USER LOGNAME HOME PATH CDPATH SHELL BROWSER +syn keyword fishVariables fish_color_normal fish_color_command fish_color_substitution fish_color_redirection fish_color_end fish_color_error fish_color_param fish_color_comment fish_color_match fish_color_search_match fish_color_cwd fish_pager_color_prefix fish_pager_color_completion fish_pager_color_description fish_pager_color_progress + +"syn keyword fishShellVariables LC_TYPE LC_MESSAGE MAIL MAILCHECK +"syn keyword fishShellVariables PS1 PS2 IFS EGID EUID ERRNO GID UID +"syn keyword fishShellVariables HOST LINENO MACHTYPE OLDPWD OPTARG +"syn keyword fishShellVariables OPTIND OSTYPE PPID PWD RANDOM SECONDS +"syn keyword fishShellVariables SHLVL TTY signals TTYIDLE USERNAME +"syn keyword fishShellVariables VENDOR fish_NAME fish_VERSION ARGV0 +"syn keyword fishShellVariables BAUD COLUMNS cdpath DIRSTACKSIZE +"syn keyword fishShellVariables FCEDIT fignore fpath histchars HISTCHARS +"syn keyword fishShellVariables HISTFILE HISTSIZE KEYTIMEOUT LANG +"syn keyword fishShellVariables LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES +"syn keyword fishShellVariables LC_TIME LINES LISTMAX LOGCHECK mailpath +"syn keyword fishShellVariables MAILPATH MANPATH manpath module_path +"syn keyword fishShellVariables MODULE_PATH NULLCMD path POSTEDIT +"syn keyword fishShellVariables PS3 PS4 PROMPT PROMPT2 PROMPT3 PROMPT4 +"syn keyword fishShellVariables psvar PSVAR prompt READNULLCMD +"syn keyword fishShellVariables REPORTTIME RPROMPT RPS1 SAVEHIST +"syn keyword fishShellVariables SPROMPT STTY TIMEFMT TMOUT TMPPREFIX +"syn keyword fishShellVariables watch WATCH WATCHFMT WORDCHARS ZDOTDIR +syn match fishSpecialShellVar "\$[-#@*$?!0-9]" +syn keyword fishSetVariables ignoreeof noclobber +syn region fishDerefOpr start="\${" end="}" contains=fishShellVariables +syn match fishDerefIdentifier "\$[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match fishOperator "[][}{&;|)(]" + + + +syn match fishNumber "-\=\<\d\+\>" +syn match fishComment "#.*$" contains=fishNumber,fishTodo + + +syn match fishTestOpr "-\<[oeaznlg][tfqet]\=\>\|!\==\|-\<[b-gkLprsStuwjxOG]\>" +syn region fishTest start="\[" skip="\\$" end="\]" contains=fishString,fishTestOpr,fishDerefIdentifier,fishDerefOpr +syn region fishString start=+"+ skip=+\\"+ end=+"+ contains=fishSpecial,fishOperator,fishDerefIdentifier,fishDerefOpr,fishSpecialShellVar,fishSinglequote,fishCommandSub + +syn region fishFunctions start=+function+ end=+end+ contains=fishShellVariables,fishRedir,fishCommandSub,fishVariables, fishConditional,fishRepeat,fishStatement + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_fish_syntax_inits") + if version < 508 + let did_fish_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink fishSinglequote fishString + HiLink fishConditional fishStatement + HiLink fishRepeat fishStatement + HiLink fishFunctionName fishFunction + HiLink fishFunctions fishFunction + HiLink fishCommandSub fishOperator + HiLink fishRedir fishOperator + HiLink fishSetVariables fishShellVariables + HiLink fishSpecialShellVar fishShellVariables + HiLink fishColors fishVariables + HiLink fishTestOpr fishOperator + HiLink fishDerefOpr fishSpecial + HiLink fishDerefIdentifier fishShellVariables + HiLink fishOperator Operator + HiLink fishStatement Statement + HiLink fishNumber Number + HiLink fishString String + HiLink fishComment Comment + HiLink fishSpecial Special + HiLink fishTodo Todo + HiLink fishShellVariables Special + hi fishOperator term=underline ctermfg=6 guifg=Purple gui=bold + " hi fishShellVariables term=underline ctermfg=2 guifg=SeaGreen gui=bold + " hi fishVariables term=underline ctermfg=5 guifg=Blue gui=bold + " hi fishFunction guifg=Red gui=bold + " hi fishFunctionName guifg=Blue gui=bold + "hi fishVariables ctermbg=3 guifg=Blue gui=bold + + delcommand HiLink +endif + +let b:current_syntax = "fish" + +" vim: ts=8