# HG changeset patch # User Steve Losh # Date 1396390917 14400 # Node ID 758d680aa791d74cf9becbbb0ec4bd31aa754971 # Parent 15fb2a3ae7b6f76bb350083e1e045ecdfa4bdf90 MOAR diff -r 15fb2a3ae7b6 -r 758d680aa791 .hgignore --- a/.hgignore Wed Mar 19 11:46:39 2014 -0400 +++ b/.hgignore Tue Apr 01 18:21:57 2014 -0400 @@ -34,3 +34,4 @@ fish/generated_completions/ weechat/python/autoload/local.py weechat/script/plugins.xml.gz +fish/local.fish diff -r 15fb2a3ae7b6 -r 758d680aa791 .hgsub --- a/.hgsub Wed Mar 19 11:46:39 2014 -0400 +++ b/.hgsub Tue Apr 01 18:21:57 2014 -0400 @@ -39,6 +39,7 @@ vim/bundle/strftimedammit = [hg]https://bitbucket.org/sjl/strftimedammit.vim/ vim/bundle/surround = [git]git://github.com/tpope/vim-surround.git vim/bundle/syntastic = [git]git://github.com/scrooloose/syntastic.git +vim/bundle/timl = [git]git://github.com/tpope/timl.git vim/bundle/tslime = [git]git://github.com/sjl/tslime.vim.git vim/bundle/vitality = [hg]https://bitbucket.org/sjl/vitality.vim vim/bundle/yankring = [git]git://github.com/vim-scripts/YankRing.vim.git diff -r 15fb2a3ae7b6 -r 758d680aa791 .hgsubstate --- a/.hgsubstate Wed Mar 19 11:46:39 2014 -0400 +++ b/.hgsubstate Tue Apr 01 18:21:57 2014 -0400 @@ -39,6 +39,7 @@ 26fbdd7d1f1aa5600d2ebf39bbdd292c38aac16e vim/bundle/strftimedammit 1a73f607f8f5477d6942df2eb6e7245c4864f4d3 vim/bundle/surround 14cb306414dda411b1809a088e18eb2796030095 vim/bundle/syntastic +e5433ec4644f266df27202f1e0d6b4ca45bff392 vim/bundle/timl 113b1f14a1fb92b9c026a71485c9ed402a2045f8 vim/bundle/tslime 84365f56fc87c11f1f04eed487d256cf8b128f7c vim/bundle/vitality a884f3a161fa3cd8c996eb53a3d1c68631f60c21 vim/bundle/yankring diff -r 15fb2a3ae7b6 -r 758d680aa791 bin/murder --- a/bin/murder Wed Mar 19 11:46:39 2014 -0400 +++ b/bin/murder Tue Apr 01 18:21:57 2014 -0400 @@ -8,7 +8,7 @@ # How much time processes should be given to finish their work before we try the # next signal. Configurable, as long as the number of elements in this array # matches the number of elements in $signals. -delays=(4 6 8 0) +delays=(10 10 15 1) # Takes a list of PIDs and ends the processes through increasingly rude means. function mykill { @@ -20,7 +20,7 @@ local retval=0 if [[ $# -eq 0 ]]; then - printf 'mykill: Too few arguments: %d\nmykill: Usage: mykill \n' $# + printf 'murder: Too few arguments: %d\nmurder: Usage: murder \n' $# retval=1 else for pid in $@; do @@ -28,6 +28,7 @@ # Try the next signal if the process is alive AND there are more # signals to attempt AND the previous kill reported no errors. while $ps $pid > /dev/null && [[ $index -lt ${#signals} ]] && [[ $retval -eq 0 ]]; do + echo trying: kill -s ${signals[$index]} $pid output=$(kill -s ${signals[$index]} $pid 2>&1) retval=$? local killed=1 @@ -37,17 +38,17 @@ done if [[ -z $killed ]]; then - printf 'mykill: Process with PID %d does not exist.\n' $pid + printf 'murder: Process with PID %d does not exist.\n' $pid elif ! ${ps} ${pid} > /dev/null; then index=$(($index - 1)) - printf 'mykill: Killed process with PID %d with signal %s (%d).\n' $pid ${names[$index]} ${signals[$index]} + printf 'murder: Killed process with PID %d with signal %s (%d).\n' $pid ${names[$index]} ${signals[$index]} elif [[ ${retval} -ne 0 ]]; then - printf 'mykill: kill failed: %s\n' $(echo ${output} | cut -d ' ' -f 5-) + printf 'murder: kill failed: %s\n' $(echo ${output} | cut -d ' ' -f 5-) elif [[ ${index} -eq ${#signals} ]]; then - printf 'mykill: Failed to kill process with PID %d with signals %s\n' $pid "$(echo ${names[@]})" + printf 'murder: Failed to kill process with PID %d with signals %s\n' $pid "$(echo ${names[@]})" retval=-1 fi done diff -r 15fb2a3ae7b6 -r 758d680aa791 fish/config.fish --- a/fish/config.fish Wed Mar 19 11:46:39 2014 -0400 +++ b/fish/config.fish Tue Apr 01 18:21:57 2014 -0400 @@ -220,8 +220,8 @@ # }}} -if test -s $HOME/.config/fish/local.fish - . $HOME/.config/fish/local.fish +if test -f $HOME/.local.fish + . $HOME/.local.fish end true diff -r 15fb2a3ae7b6 -r 758d680aa791 fish/functions/irclogs.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/irclogs.fish Tue Apr 01 18:21:57 2014 -0400 @@ -0,0 +1,5 @@ +function irclogs -d "Open the IRC logs dir in vim" + cd ~/.weechat/logs/ + vim . + cd - +end diff -r 15fb2a3ae7b6 -r 758d680aa791 fish/functions/trademark.fish --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fish/functions/trademark.fish Tue Apr 01 18:21:57 2014 -0400 @@ -0,0 +1,3 @@ +function trademark + echo -n ™ | pbcopy +end diff -r 15fb2a3ae7b6 -r 758d680aa791 vim/after/ftplugin/timl.tim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/after/ftplugin/timl.tim Tue Apr 01 18:21:57 2014 -0400 @@ -0,0 +1,26 @@ +; These are all out here in the middle of goddamned nowhere because the TimL +; ftplugin won't you disable mappings like any other plugin. Also this has to +; be a .tim file because the order of loading goes like this: +; +; ftplugin/*.vim +; after/ftplugin/*.vim +; ftplugin/*.tim +; after/ftplugin/*.tim +; +; Kill me. + +(execute "silent! nunmap cp") +(execute "silent! nunmap cpp") +(execute "silent! nunmap K") + +; Eval fuck only knows what. Toplevel/current form? +(execute "nnoremap e :set opfunc=timl#interactive#eval_opfuncg@") + +; Eval buffer +(execute "nnoremap b :w:source %") + +; Man +(execute "nnoremap M :execute 'help' ftplugin#timl#cursor_keyword()") + +; R[E]PL +(execute "nnoremap E :TLrepl") diff -r 15fb2a3ae7b6 -r 758d680aa791 vim/vimrc --- a/vim/vimrc Wed Mar 19 11:46:39 2014 -0400 +++ b/vim/vimrc Tue Apr 01 18:21:57 2014 -0400 @@ -741,8 +741,8 @@ au! au BufNewFile,BufRead *.edn set filetype=clojure - au BufNewFile,BufRead riemann.config set filetype=clojure + au FileType clojure silent! call TurnOnClojureFolding() au FileType clojure compiler clojure au FileType clojure setlocal report=100000 @@ -1035,6 +1035,11 @@ " Make { insert a pair of brackets in such a way that the cursor is correctly " positioned inside of them AND the following code doesn't get unfolded. au Filetype javascript inoremap { {}.kA + " } + + " Prettify a hunk of JSON with p + au FileType javascript nnoremap p ^vg_:!python -m json.tool + au FileType javascript vnoremap p :!python -m json.tool augroup END " }}} @@ -1258,6 +1263,57 @@ augroup END " }}} +" TimL {{{ + +" let g:timl_fold_extra = [ +" \ 'defgauge', +" \ 'defmeter', +" \ 'defhistogram', +" \ 'defcounter', +" \ 'deftimer' +" \ ] + +" let g:timl_highlight_extra_defs = [ +" \ 'defparser', +" \ 'deftest', +" \ 'match', +" \ +" \ 'defroutes' +" \ ] + + +augroup ft_timl + au! + + au FileType timl silent! call TurnOnClojureFolding() + + " Things that should be indented 2-spaced + " au FileType clojure setlocal lispwords+=when-found,defform,when-valid + + au FileType timl RainbowParenthesesActivate + au syntax timl RainbowParenthesesLoadRound + au syntax timl RainbowParenthesesLoadSquare + au syntax timl RainbowParenthesesLoadBraces + + " Friendlier Paredit mappings. + au FileType timl noremap () :call PareditWrap("(", ")") + au FileType timl noremap )( :call PareditSplice() + au FileType timl noremap (( :call PareditMoveLeft() + au FileType timl noremap )) :call PareditMoveRight() + au FileType timl noremap (j :call PareditJoin() + au FileType timl noremap (s :call PareditSplit() + au FileType timl noremap [ :call PareditSmartJumpOpening(0) + au FileType timl noremap ] :call PareditSmartJumpClosing(0) + " ))) + + au FileType timl call PareditInitBuffer() + + " Indent top-level form. + au FileType timl nmap = mz99[(v%='z + " ]) +augroup END + +" }}} " Vagrant {{{ augroup ft_vagrant