--- a/.hgignore Tue Apr 01 20:06:03 2014 -0400
+++ b/.hgignore Tue Apr 01 20:06:13 2014 -0400
@@ -34,3 +34,4 @@
fish/generated_completions/
weechat/python/autoload/local.py
weechat/script/plugins.xml.gz
+fish/local.fish
--- a/.hgsub Tue Apr 01 20:06:03 2014 -0400
+++ b/.hgsub Tue Apr 01 20:06:13 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
--- a/.hgsubstate Tue Apr 01 20:06:03 2014 -0400
+++ b/.hgsubstate Tue Apr 01 20:06:13 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/agignore Tue Apr 01 20:06:13 2014 -0400
@@ -0,0 +1,6 @@
+tags
+tags.bak
+*.wsdl
+target
+*.public.key
+*.private.key
--- a/bash_profile Tue Apr 01 20:06:03 2014 -0400
+++ b/bash_profile Tue Apr 01 20:06:13 2014 -0400
@@ -19,6 +19,7 @@
alias h='hg'
alias g='git'
+alias pj='python -m json.tool'
alias pbc='pbcopy'
alias pbp='pbpaste'
alias pbpb='pbp | pb'
--- a/bin/bootstrap.sh Tue Apr 01 20:06:03 2014 -0400
+++ b/bin/bootstrap.sh Tue Apr 01 20:06:13 2014 -0400
@@ -43,6 +43,7 @@
ensure_link "lib/dotfiles/hgignore" ".hgignore"
ensure_link "lib/dotfiles/gitignore" ".gitignore"
ensure_link "lib/dotfiles/ffignore" ".ffignore"
+ensure_link "lib/dotfiles/agignore" ".agignore"
ensure_link "lib/dotfiles/ctags" ".ctags"
ensure_link "lib/dotfiles/grc" ".grc"
ensure_link "lib/dotfiles/bash_profile" ".bash_profile"
--- a/bin/murder Tue Apr 01 20:06:03 2014 -0400
+++ b/bin/murder Tue Apr 01 20:06:13 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 <PIDs...>\n' $#
+ printf 'murder: Too few arguments: %d\nmurder: Usage: murder <PIDs...>\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
--- a/fish/config.fish Tue Apr 01 20:06:03 2014 -0400
+++ b/fish/config.fish Tue Apr 01 20:06:13 2014 -0400
@@ -1,6 +1,7 @@
# Useful functions {{{
function ef; vim ~/.config/fish/config.fish; end
+function eff; vim ~/.config/fish/functions; end
function ev; vim ~/.vimrc; end
function ed; vim ~/.vim/custom-dictionary.utf-8.add; end
function eo; vim ~/Dropbox/Org; end
@@ -219,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
--- a/fish/functions/ag.fish Tue Apr 01 20:06:03 2014 -0400
+++ b/fish/functions/ag.fish Tue Apr 01 20:06:13 2014 -0400
@@ -22,6 +22,9 @@
# that little tidbit and can we please get a shell without complete
# bullshit as a scripting language syntax?
if grep -q 'pragma: skipvcs' '.agignore'
+ # If .agignore contains pragma: skipvcs, then we'll run ag in
+ # "disregard .gitignore/.hgignore/svn:ignore" mode. This lets us
+ # still search in files the VCS has ignored.
actual_ag --search-files -U $argv
else
actual_ag --search-files $argv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/irclogs.fish Tue Apr 01 20:06:13 2014 -0400
@@ -0,0 +1,5 @@
+function irclogs -d "Open the IRC logs dir in vim"
+ cd ~/.weechat/logs/
+ vim .
+ cd -
+end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/trademark.fish Tue Apr 01 20:06:13 2014 -0400
@@ -0,0 +1,3 @@
+function trademark
+ echo -n ™ | pbcopy
+end
--- a/gitignore Tue Apr 01 20:06:03 2014 -0400
+++ b/gitignore Tue Apr 01 20:06:13 2014 -0400
@@ -6,3 +6,4 @@
*-SCRATCH.*
.idea
*.iml
+.DS_Store
--- a/hgrc Tue Apr 01 20:06:03 2014 -0400
+++ b/hgrc Tue Apr 01 20:06:13 2014 -0400
@@ -19,6 +19,7 @@
schemes =
progress =
fetch =
+shelve =
prompt = ~/lib/dotfiles/mercurial/hg-prompt/prompt.py
histedit = ~/lib/dotfiles/mercurial/histedit/hg_histedit.py
hggit = ~/.hg-git/hggit
--- a/tmux/tmux.conf Tue Apr 01 20:06:03 2014 -0400
+++ b/tmux/tmux.conf Tue Apr 01 20:06:13 2014 -0400
@@ -88,7 +88,7 @@
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour238,nobold]⮀#[fg=colour15,bg=colour238,bold] #(ls ~/.mail/steve-stevelosh.com/INBOX/cur ~/.mail/steve-stevelosh.com/INBOX/new | wc -l | tr -d " ") #[fg=colour238,bg=colour234,nobold]⮀'
-set -g status-right '#[fg=colour245]⮃ %R ⮃ %d %b #[fg=colour254,bg=colour234,nobold]#(rdio-current-track-tmux)⮂#[fg=colour16,bg=colour254,bold] #h '
+set -g status-right "#[fg=colour245]⮃ #(date -u +%%H:%%M) UTC ⮃ %d %b #[fg=colour254,bg=colour234,nobold]#(rdio-current-track-tmux)⮂#[fg=colour16,bg=colour254,bold] #h "
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour16,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vim/after/ftplugin/timl.tim Tue Apr 01 20:06:13 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 <buffer> cp")
+(execute "silent! nunmap <buffer> cpp")
+(execute "silent! nunmap <buffer> K")
+
+; Eval fuck only knows what. Toplevel/current form?
+(execute "nnoremap <silent><buffer> <localleader>e :set opfunc=timl#interactive#eval_opfunc<CR>g@")
+
+; Eval buffer
+(execute "nnoremap <buffer> <localleader>b :w<cr>:source %<cr>")
+
+; Man
+(execute "nnoremap <buffer> M :execute 'help' ftplugin#timl#cursor_keyword()<CR>")
+
+; R[E]PL
+(execute "nnoremap <buffer> <localleader>E :TLrepl<CR>")
--- a/vim/custom-dictionary.utf-8.add Tue Apr 01 20:06:03 2014 -0400
+++ b/vim/custom-dictionary.utf-8.add Tue Apr 01 20:06:13 2014 -0400
@@ -159,3 +159,5 @@
GPG
TLS
Reykjavík
+meatspace
+scrollback
--- a/vim/vimrc Tue Apr 01 20:06:03 2014 -0400
+++ b/vim/vimrc Tue Apr 01 20:06:13 2014 -0400
@@ -265,7 +265,6 @@
iabbrev vrcf `~/.vimrc` file
iabbrev pcf Participatory Culture Foundation
-inoremap <c-l> <c-k>l*
" }}}
" Convenience mappings ---------------------------------------------------- {{{
@@ -387,6 +386,12 @@
" Keep the cursor in place while joining lines
nnoremap J mzJ`z
+" Join an entire paragraph.
+"
+" Useful for writing GitHub comments in actual Markdown and then translating it
+" to their bastardized version of Markdown.
+nnoremap <leader>J mzvipJ`z
+
" Split line (sister to [J]oin lines)
" The normal use of S is covered by cc, so don't worry about shadowing it.
nnoremap S i<cr><esc>^mwgk:silent! s/\v +$//<cr>:noh<cr>`w
@@ -459,10 +464,15 @@
" This should preserve your last yank/delete as well.
nnoremap zl :let @z=@"<cr>x$p:let @"=@z<cr>
+" Ranger
+nnoremap <leader>r :silent !ranger %:h<cr>:redraw!<cr>
+nnoremap <leader>R :silent !ranger<cr>:redraw!<cr>
+
" Insert Mode Completion {{{
inoremap <c-f> <c-x><c-f>
inoremap <c-]> <c-x><c-]>
+inoremap <c-l> <c-x><c-l>
" }}}
@@ -475,6 +485,7 @@
nnoremap <leader>ed :vsplit ~/.vim/custom-dictionary.utf-8.add<cr>
nnoremap <leader>eo :vsplit ~/Dropbox/Org<cr>4j
nnoremap <leader>eh :vsplit ~/.hgrc<cr>
+nnoremap <leader>eg :vsplit ~/.gitconfig<cr>
nnoremap <leader>ep :vsplit ~/.pentadactylrc<cr>
nnoremap <leader>em :vsplit ~/.mutt/muttrc<cr>
nnoremap <leader>ez :vsplit ~/lib/dotfiles/zsh<cr>4j
@@ -730,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
@@ -1028,6 +1039,11 @@
" Make {<cr> 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 <buffer> {<cr> {}<left><cr><space><space><space><space>.<cr><esc>kA<bs>
+ " }
+
+ " Prettify a hunk of JSON with <localleader>p
+ au FileType javascript nnoremap <buffer> <localleader>p ^vg_:!python -m json.tool<cr>
+ au FileType javascript vnoremap <buffer> <localleader>p :!python -m json.tool<cr>
augroup END
" }}}
@@ -1251,6 +1267,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 <buffer> () :<c-u>call PareditWrap("(", ")")<cr>
+ au FileType timl noremap <buffer> )( :<c-u>call PareditSplice()<cr>
+ au FileType timl noremap <buffer> (( :<c-u>call PareditMoveLeft()<cr>
+ au FileType timl noremap <buffer> )) :<c-u>call PareditMoveRight()<cr>
+ au FileType timl noremap <buffer> (j :<c-u>call PareditJoin()<cr>
+ au FileType timl noremap <buffer> (s :<c-u>call PareditSplit()<cr>
+ au FileType timl noremap <buffer> [ :<c-u>call PareditSmartJumpOpening(0)<cr>
+ au FileType timl noremap <buffer> ] :<c-u>call PareditSmartJumpClosing(0)<cr>
+ " )))
+
+ au FileType timl call PareditInitBuffer()
+
+ " Indent top-level form.
+ au FileType timl nmap <buffer> <localleader>= mz99[(v%='z
+ " ])
+augroup END
+
+" }}}
" Vagrant {{{
augroup ft_vagrant
@@ -1816,16 +1883,26 @@
xnoremap iN :<c-u>call <SID>NumberTextObject(1)<cr>
function! s:NumberTextObject(whole)
- normal! v
-
- while getline('.')[col('.')] =~# '\v[0-9]'
+ let num = '\v[0-9]'
+
+ " If the current char isn't a number, walk forward.
+ while getline('.')[col('.') - 1] !~# num
normal! l
endwhile
+ " Now that we're on a number, start selecting it.
+ normal! v
+
+ " If the char after the cursor is a number, select it.
+ while getline('.')[col('.')] =~# num
+ normal! l
+ endwhile
+
+ " If we want an entire word, flip the select point and walk.
if a:whole
normal! o
- while col('.') > 1 && getline('.')[col('.') - 2] =~# '\v[0-9]'
+ while col('.') > 1 && getline('.')[col('.') - 2] =~# num
normal! h
endwhile
endif