--- a/.hgsubstate Thu Dec 18 21:59:00 2014 -0500
+++ b/.hgsubstate Thu Dec 18 21:59:14 2014 -0500
@@ -26,7 +26,7 @@
a1433c485eb254838c1db52e087d5ec4d1e77cfd vim/bundle/nerdtree
871bc88a5bbcb6e8844a64450b8e7f8ac13aac24 vim/bundle/orgmode
b6b7d8b1982b67a0bba936c198041f6f3a2286a4 vim/bundle/paredit
-f84e170fce4f6cb60b6d1b4baa30076f2b372f1e vim/bundle/pgsql
+1a436f7d875b4ec630da081b041c73264235c7e7 vim/bundle/pgsql
2af074850fde676743f655775e3e151925751adf vim/bundle/powerline
1b4b8f1a8f1c88d8caae6c1b12c22c52ef418f32 vim/bundle/python-mode
eb8baa5428bde10ecc1cb14eed1d6e16f5f24695 vim/bundle/rainbow-parentheses
@@ -38,7 +38,7 @@
8e1c1dc358de2132b7fbc1adaf94f528e3238e4d vim/bundle/splice
26fbdd7d1f1aa5600d2ebf39bbdd292c38aac16e vim/bundle/strftimedammit
1a73f607f8f5477d6942df2eb6e7245c4864f4d3 vim/bundle/surround
-14cb306414dda411b1809a088e18eb2796030095 vim/bundle/syntastic
+67ffe58818930e95163ead541a2700cec41c13f7 vim/bundle/syntastic
c4dda1da8d6b290c9d01f5568cfb6f0effeeb3de vim/bundle/timl
bf4a599901e0a9c85238158c661351dfaa1c91c2 vim/bundle/tslime2
84365f56fc87c11f1f04eed487d256cf8b128f7c vim/bundle/vitality
--- a/bin/lein Thu Dec 18 21:59:00 2014 -0500
+++ b/bin/lein Thu Dec 18 21:59:14 2014 -0500
@@ -4,7 +4,7 @@
# somewhere on your $PATH, like ~/bin. The rest of Leiningen will be
# installed upon first run into the ~/.lein/self-installs directory.
-export LEIN_VERSION="2.3.4"
+export LEIN_VERSION="2.5.0"
case $LEIN_VERSION in
*SNAPSHOT) SNAPSHOT="YES" ;;
@@ -27,7 +27,7 @@
# ensure we have native paths
if $cygwin && [[ "$1" == /* ]]; then
echo -n "$(cygpath -wp "$1")"
- elif [[ "$OSTYPE" == "msys" && "$1" == /* ]]; then
+ elif [[ "$OSTYPE" == "msys" && "$1" == /?/* ]]; then
echo -n "$(sh -c "(cd $1 2</dev/null && pwd -W) || echo $1 | sed 's/^\\/\([a-z]\)/\\1:/g'")"
else
echo -n "$1"
@@ -40,21 +40,21 @@
shift
while [ -n "$1" ];do
# http://bashify.com/?Useful_Techniques:Indirect_Variables:Indirect_Assignment
- export ${path_var}="${!path_var}${delimiter}$(make_native_path "$1")"
+ if [[ -z ${!path_var} ]]; then
+ export ${path_var}="$(make_native_path "$1")"
+ else
+ export ${path_var}="${!path_var}${delimiter}$(make_native_path "$1")"
+ fi
shift
done
}
function download_failed_message {
- echo "Failed to download $1"
+ echo "Failed to download $1 (exit code $2)"
echo "It's possible your HTTP client's certificate store does not have the"
echo "correct certificate authority needed. This is often caused by an"
- echo "out-of-date version of libssl. Either upgrade it or set HTTP_CLIENT"
- echo "to turn off certificate checks:"
- echo " export HTTP_CLIENT=\"wget --no-check-certificate -O\" # or"
- echo " export HTTP_CLIENT=\"curl --insecure -f -L -o\""
- echo "It's also possible that you're behind a firewall haven't yet"
- echo "set HTTP_PROXY and HTTPS_PROXY."
+ echo "out-of-date version of libssl. It's also possible that you're behind a"
+ echo "firewall and haven't set HTTP_PROXY and HTTPS_PROXY."
}
function self_install {
@@ -65,14 +65,15 @@
fi
echo "Downloading Leiningen to $LEIN_JAR now..."
mkdir -p "$(dirname "$LEIN_JAR")"
- LEIN_URL="https://leiningen.s3.amazonaws.com/downloads/leiningen-$LEIN_VERSION-standalone.jar"
+ LEIN_URL="https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.jar"
$HTTP_CLIENT "$LEIN_JAR.pending" "$LEIN_URL"
- if [ $? == 0 ]; then
+ local exit_code=$?
+ if [ $exit_code == 0 ]; then
# TODO: checksum
mv -f "$LEIN_JAR.pending" "$LEIN_JAR"
else
rm "$LEIN_JAR.pending" 2> /dev/null
- download_failed_message "$LEIN_URL"
+ download_failed_message "$LEIN_URL" "$exit_code"
exit 1
fi
}
@@ -175,7 +176,7 @@
ORIG_PWD="$PWD"
cd "$LEIN_DIR"
- $0 classpath .lein-classpath
+ LEIN_NO_USER_PROFILES=1 $0 classpath .lein-classpath
sum "$LEIN_DIR/project.clj" "$LEIN_DIR/leiningen-core/project.clj" > \
.lein-project-checksum
cd "$ORIG_PWD"
@@ -205,8 +206,9 @@
export JAVA_CMD="${JAVA_CMD:-"java"}"
export LEIN_JAVA_CMD="${LEIN_JAVA_CMD:-$JAVA_CMD}"
-if [[ "$(basename "$LEIN_JAVA_CMD")" == *drip* ]]; then
+if [[ -z "${DRIP_INIT+x}" && "$(basename "$LEIN_JAVA_CMD")" == *drip* ]]; then
export DRIP_INIT="$(printf -- '-e\n(require (quote leiningen.repl))')"
+ export DRIP_INIT_CLASS="clojure.main"
fi
# Support $JAVA_OPTS for backwards-compatibility.
@@ -265,6 +267,10 @@
LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/$TARGET_VERSION/bin/lein"
$HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL"
if [ $? == 0 ]; then
+ cmp -s "$TARGET" "$SCRIPT"
+ if [ $? == 0 ]; then
+ echo "Leiningen is already up-to-date."
+ fi
mv "$TARGET" "$SCRIPT" && chmod +x "$SCRIPT"
exec "$SCRIPT" version
else
@@ -290,14 +296,22 @@
echo "Leiningen's classpath: $CLASSPATH"
fi
- if ([ "$LEIN_FAST_TRAMPOLINE" != "" ] || [ -r .lein-fast-trampoline ]) &&
- [ -r project.clj ]; then
+ if [ -r .lein-fast-trampoline ]; then
+ export LEIN_FAST_TRAMPOLINE='y'
+ fi
+
+ if [ "$LEIN_FAST_TRAMPOLINE" != "" ] && [ -r project.clj ]; then
INPUTS="$@ $(cat project.clj) $LEIN_VERSION $(test -f "$LEIN_HOME/profiles.clj" && cat "$LEIN_HOME/profiles.clj")"
- INPUT_CHECKSUM=$(echo $INPUTS | shasum - | cut -f 1 -d " ")
+ export INPUT_CHECKSUM=$(echo $INPUTS | shasum - | cut -f 1 -d " ")
# Just don't change :target-path in project.clj, mkay?
TRAMPOLINE_FILE="target/trampolines/$INPUT_CHECKSUM"
else
- TRAMPOLINE_FILE="$(mktemp /tmp/lein-trampoline-XXXXXXXXXXXXX)"
+ if hash mktemp 2>/dev/null; then
+ # Check if mktemp is available before using it
+ TRAMPOLINE_FILE="$(mktemp /tmp/lein-trampoline-XXXXXXXXXXXXX)"
+ else
+ TRAMPOLINE_FILE="/tmp/lein-trampoline-$$"
+ fi
trap "rm -f $TRAMPOLINE_FILE" EXIT
fi
@@ -312,11 +326,12 @@
exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
else
export TRAMPOLINE_FILE
- "$LEIN_JAVA_CMD" -client \
+ "$LEIN_JAVA_CMD" \
"${BOOTCLASSPATH[@]}" \
- $LEIN_JVM_OPTS \
-Dfile.encoding=UTF-8 \
-Dmaven.wagon.http.ssl.easy=false \
+ -Dmaven.wagon.rto=10000 \
+ $LEIN_JVM_OPTS \
-Dleiningen.original.pwd="$ORIGINAL_PWD" \
-Dleiningen.script="$SCRIPT" \
-classpath "$CLASSPATH" \
@@ -345,4 +360,3 @@
fi
fi
fi
-
--- a/bin/sort-scala-imports Thu Dec 18 21:59:00 2014 -0500
+++ b/bin/sort-scala-imports Thu Dec 18 21:59:14 2014 -0500
@@ -5,6 +5,7 @@
bracket_padding = None
+MAX_LINE_WIDTH = 100
def next_line():
return sys.stdin.readline().rstrip('\n')
@@ -30,6 +31,7 @@
"""
prefix = self.prefix
guts = self.guts
+ guts.sort(key=lambda s: s.lower())
if not prefix:
# This is just a single-line, single-item import, so we don't need
@@ -40,10 +42,9 @@
bracket_padding,
', '.join(guts),
bracket_padding)
- if len(single) > 100:
+ if len(single) > MAX_LINE_WIDTH:
self.main_line = prefix + '{'
self.guts = guts
- self.guts.sort(key=lambda s: s.lower())
else:
self.main_line = single
self.guts = []
--- a/dotcss/weather.com.css Thu Dec 18 21:59:00 2014 -0500
+++ b/dotcss/weather.com.css Thu Dec 18 21:59:14 2014 -0500
@@ -1,209 +0,0 @@
-// First grab Stylebot: https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en
-
-#wx-breaking-now {
- display: none;
-}
-
-#wx-wrapper {
- border-style: none;
-}
-
-#wx-rail {
- display: none;
-}
-
-div.wx-inner {
- display: none;
-}
-
-div.wx-module.wx-gptADS {
- display: none;
-}
-
-div.wx-next a {
- display: none;
-}
-
-div.wx-nav-arrow.wx-k-lg-rt {
- display: none;
-}
-
-div.wx-content {
- display: none;
-}
-
-div.wx-social-share-ls-wrapper ul {
- display: none;
-}
-
-div.wx-search form input {
- display: none;
-}
-
-div.wx-searchButton {
- display: none;
-}
-
-div.wx-search {
- display: none;
-}
-
-#wx-bottom-inner {
- height: 400px;
-}
-
-dl.wx-1 {
- display: none;
-}
-
-dl.wx-2 {
- display: none;
-}
-
-dl.wx-3 {
- display: none;
-}
-
-dl.wx-4 {
- display: none;
-}
-
-ul.wx-social {
- display: none;
-}
-
-div.wx-legal {
- display: none;
-}
-
-#wx-Strip {
- display: none;
-}
-
-#wx-header-tools {
- display: none;
-}
-
-div.wx-desktop-weather-btn a {
- display: none;
-}
-
-div.wx-desktop-weather-bg {
- display: none;
-}
-
-span.wx-icon.wx-desktop-weather {
- display: none;
-}
-
-li.twc-weather-edit-location {
- display: none;
-}
-
-div.wx-grid6of6 {
- height: 0;
- margin-bottom: 0;
- padding-bottom: 0;
-}
-
-#wx-inner-rail {
- clear: left;
-}
-
-div.fby-tab.fby-tab-r a {
- display: none;
-}
-
-div.fby-tab.fby-tab-r {
- display: none;
-}
-
-div.wx-prev a {
- display: none;
-}
-
-div.wx-nav-arrow.wx-k-lg-lt {
- display: none;
-}
-
-div.wx-free-title h3 {
- display: none;
-}
-
-a.wx-icon.wx-cond.wx-phone {
- display: none;
-}
-
-a.wx-icon.wx-cond.wx-desktop {
- display: none;
-}
-
-a.wx-icon.wx-cond.wx-tablet {
- display: none;
-}
-
-div.wx-social-share-bar {
- display: none;
-}
-
-div.wx-lifestyles div {
- display: none;
-}
-
-#fsr_modalOverlay {
- display: none;
-}
-
-div.fsrwin {
- display: none;
-}
-
-div.wx-24hour.wx-module.wx-grid3of6.wx-weather {
- margin-left: 0;
- padding-left: 0;
-}
-
-div#wx-footer {
- border-top: 0;
-}
-
-div#wx-top-wrap {
- width: 660px;
-}
-
-div#wx-main {
- float: none;
- margin: 0 auto;
-}
-
-div.trc_rbox_outer {
- display: none;
-}
-
-div.trc_rbox_header.trc_rbox_border_elm {
- display: none;
-}
-
-div.trc_rbox_container div {
- display: none;
-}
-
-div.wx-map {
- margin-left: 165px;
-}
-
-div#wx-forecast-container div.wx-map {
- margin-left: 0;
-}
-
-.wx-grid6of6 {
- width: auto;
-}
-
-div.wx-corsican {
- display: none;
-}
-
-div.wx-module.wx-featured.wx-wwir-module.wx-cond-bg {
- display: none;
-}
\ No newline at end of file
--- a/dotjs/500px.com.js Thu Dec 18 21:59:00 2014 -0500
+++ b/dotjs/500px.com.js Thu Dec 18 21:59:14 2014 -0500
@@ -1,8 +0,0 @@
-$(function() {
- var i = $("img#mainphoto.clickable").attr("src");
-
- $('body').append("<img width=40 height=40 id='fucking-let-me-drag-you-assholes' src='" + i + "'>");
-
- $('#fucking-let-me-drag-you-assholes').css('position', 'absolute').css('top', '40px').css('left', '40px');
-
-});
--- a/fish/config.fish Thu Dec 18 21:59:00 2014 -0500
+++ b/fish/config.fish Thu Dec 18 21:59:14 2014 -0500
@@ -19,6 +19,10 @@
function ....; cd ../../..; end
function .....; cd ../../../..; end
+# I give up
+alias :q exit
+alias :qa exit
+
# }}}
# Completions {{{
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/fy.fish Thu Dec 18 21:59:14 2014 -0500
@@ -0,0 +1,20 @@
+function fy
+ echo -n ' / \
+ |\_/|
+ |---|
+ | |
+ | |
+ _ |=-=| _
+ _ / \| |/ \
+ / \| | | ||\
+| | | | | \>
+| | | | | \
+| - - - - |) )
+| /
+ \ /
+ \ /
+ \ /
+ \ /
+ | |
+ ' | pbcopy
+end
--- a/gitconfig Thu Dec 18 21:59:00 2014 -0500
+++ b/gitconfig Thu Dec 18 21:59:14 2014 -0500
@@ -105,7 +105,7 @@
; ksshow will open a single specific commit in kaleidoscope
; it includes the commit log info as a separate file
- ksshow = "!sh -c 'export KSID=`uuidgen`; git log -n1 $1 > .git/LOG_MESSAGE; ksdiff --partial-changeset --UUID $KSID -- /dev/null .git/LOG_MESSAGE; git ksdiffid $1^..$1; ksdiff --mark-changeset-as-closed $KSID' -"
+ ksshow = "!sh -c 'export KSID=`uuidgen`; git log -n1 $1 > .git/LOG_MESSAGE_$KSID; ksdiff --partial-changeset --UUID $KSID -- /dev/null .git/LOG_MESSAGE_$KSID; git ksdiffid $1^..$1; ksdiff --mark-changeset-as-closed $KSID' -"
; ksreview takes a branch, finds all commits in that branch that aren't
; merged into master, and opens them one-by-one with ksshow. It's good for
@@ -116,6 +116,7 @@
; review takes a pull request URL and reviews it
; only works if you have the PR-fetching turned on and shit
review = "!sh -c 'git fetch upstream && git ksreviewfor `echo $1 | sed -Ee \"s_.*pull/([0-9]+)_refs/pull/upstream/\\1_\"` upstream/master' -"
+ reviewcombined = "!sh -c 'git fetch upstream && git ksdiff upstream/master `echo $1 | sed -Ee \"s_.*pull/([0-9]+)_refs/pull/upstream/\\1_\"`' -"
; END KALEIDOSCOPE SECTION
--- a/keyremap4macbook/private.xml Thu Dec 18 21:59:00 2014 -0500
+++ b/keyremap4macbook/private.xml Thu Dec 18 21:59:14 2014 -0500
@@ -68,6 +68,24 @@
<autogen>--KeyToKey-- KeyCode::SPACE, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::SPACE</autogen>
</item>
<item>
+ <name>Remap Held Tab to Hyper</name>
+ <appendix>OS X doesn't have a Hyper. This maps Held Tab to Control + Shift + Option + Command.</appendix>
+ <appendix>You can use this key in your own custom keyboard shortcuts you create in apps.</appendix>
+
+ <identifier>space_cadet.held_tab_to_hyper</identifier>
+
+ <autogen>
+ --KeyOverlaidModifier--
+ KeyCode::TAB,
+ ModifierFlag::NONE,
+
+ KeyCode::COMMAND_L,
+ ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
+
+ KeyCode::TAB
+ </autogen>
+ </item>
+ <item>
<name>Remap Left Control to Hyper</name>
<appendix>OS X doesn't have a Hyper. This maps Left Control to Control + Shift + Option + Command.</appendix>
<appendix>You can use this key in your own custom keyboard shortcuts you create in apps.</appendix>
--- a/mutt/muttrc Thu Dec 18 21:59:00 2014 -0500
+++ b/mutt/muttrc Thu Dec 18 21:59:14 2014 -0500
@@ -45,14 +45,14 @@
# }}}
# Sidebar Patch {{{
-set sidebar_delim = ' │'
-set sidebar_visible = yes
-set sidebar_width = 26
-color sidebar_new color221 color233
-bind index,pager <down> sidebar-next
-bind index,pager <up> sidebar-prev
-bind index,pager <right> sidebar-open
-set sidebar_format = "%B %> %S"
+# set sidebar_delim = ' │'
+# set sidebar_visible = yes
+# set sidebar_width = 26
+# color sidebar_new color221 color233
+# bind index,pager <down> sidebar-next
+# bind index,pager <up> sidebar-prev
+# bind index,pager <right> sidebar-open
+# set sidebar_format = "%B %> %S"
# }}}
# Status Bar {{{
@@ -70,6 +70,7 @@
set uncollapse_jump # don't collapse on an unread message
set sort_re # thread based on regex
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
+set folder_format = "%2C %t %N %8s %f"
# }}}
# Pager View Options {{{
@@ -176,8 +177,9 @@
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# Quickly change mailboxes
-macro index \' "<change-folder>+simple/INBOX<enter>" "go to INBOX"
-macro index \" "<change-folder>+simple/archive<enter>" "go to archive"
+macro index c "<change-folder>?<toggle-mailboxes>" "change folder"
+macro index \' "<change-folder>+INBOX<enter>" "go to INBOX"
+macro index \" "<change-folder>+archive<enter>" "go to archive"
# Search with notmuch
macro index S "<enter-command>unset wait_key<enter><shell-escape>mutt-notmuch-py -G ~/.mail/search<enter><change-folder-readonly>+search<enter>" "search mail (using notmuch)"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vim/after/plugin/tslime2.vim Thu Dec 18 21:59:14 2014 -0500
@@ -0,0 +1,2 @@
+
+source ~/.vim/bundle/tslime2/plugin/tslime.tim
--- a/vim/custom-dictionary.utf-8.add Thu Dec 18 21:59:00 2014 -0500
+++ b/vim/custom-dictionary.utf-8.add Thu Dec 18 21:59:14 2014 -0500
@@ -161,5 +161,9 @@
Reykjavík
meatspace
scrollback
+tmux
precompute
fuckery
+healthcheck
+cron4j
+realtime
--- a/vim/vimrc Thu Dec 18 21:59:00 2014 -0500
+++ b/vim/vimrc Thu Dec 18 21:59:14 2014 -0500
@@ -23,8 +23,8 @@
" specifying files to load and none of them work?
"
" Computers are bullshit.
-let $BASH_ENV = "~/.bash_profile"
-set shell=/bin/bash
+" let $BASH_ENV = "~/.bash_profile"
+set shell=/bin/bash\ --login
filetype off
call pathogen#infect()
@@ -309,6 +309,7 @@
noremap <leader>p :silent! set paste<CR>"*p:set nopaste<CR>
" noremap <leader>p mz:r!pbpaste<cr>`z
vnoremap <leader>y :<c-u>call g:FuckingCopyTheTextPlease()<cr>
+nnoremap <leader>y VV:<c-u>call g:FuckingCopyTheTextPlease()<cr>
" I constantly hit "u" in visual mode when I mean to "y". Use "gu" for those rare occasions.
" From https://github.com/henrik/dotfiles/blob/master/vim/config/mappings.vim
@@ -403,7 +404,7 @@
inoremap <C-_> <space><bs><esc>:call InsertCloseTag()<cr>a
" Source
-vnoremap <leader>S y:execute @@<cr>:echo 'Sourced selection.'<cr>
+vnoremap <leader>S y:@"<CR>
nnoremap <leader>S ^vg_y:execute @@<cr>:echo 'Sourced line.'<cr>
" Marks and Quotes
@@ -472,7 +473,7 @@
nnoremap <leader>R :silent !ranger<cr>:redraw!<cr>
" Jump (see the J mini-plugin later on)
-nnoremap <leader>j :J<space>
+nnoremap <leader>J :J<space>
" Insert Mode Completion {{{
@@ -678,6 +679,19 @@
augroup END
" }}}
+" Bullshit {{{
+
+augroup ft_bullshit
+ au!
+
+ " Send to tmux with localleader e
+ au FileType bullshit nnoremap <buffer> <silent> <localleader>e :let bullshit_tslime_view = winsaveview()<cr>vip"ry:call SendToTmux(@r)<cr>:call winrestview(bullshit_tslime_view)<cr>
+
+ " kill pager with q
+ au FileType bullshit nnoremap <buffer> <silent> <localleader>q :call SendToTmuxRaw("q")<cr>
+augroup END
+
+" }}}
" C {{{
augroup ft_c
@@ -781,6 +795,10 @@
" Indent top-level form.
au FileType clojure nmap <buffer> <localleader>= mz99[(v%='z
" ])
+
+ " Not sure about this but we'll give it a try.
+ au FileType clojure nmap <buffer> gi mz99[(v%='z
+ " ])
augroup END
" }}}
@@ -799,9 +817,6 @@
" }}}
" Common Lisp {{{
-" function! SendToTmuxStripped(text)
-" call SendToTmux(substitute(a:text, '\v\n*$', '', ''))
-" endfunction
function! SetLispWords()
if exists("g:did_set_lisp_words")
return
@@ -814,6 +829,39 @@
set lispwords+=eswitch
endfunction
+function! SendLispForm()
+ let view = winsaveview()
+
+ execute "normal! vab\<esc>"
+ SendSelectionToTmuxTrimmed
+
+ call winrestview(view)
+endfunction
+
+function! SendToplevelLispForm()
+ let view = winsaveview()
+
+ " If we're on the first char of the form, calling PareditFindDefunBck will
+ " move us to the previous form, which we don't want. So instead we'll just
+ " always move a char to the right.
+ silent! normal! l
+
+ call PareditFindDefunBck()
+ execute "normal! vab\<esc>"
+ SendSelectionToTmuxTrimmed
+
+ call winrestview(view)
+endfunction
+
+function! SendLispBuffer()
+ let view = winsaveview()
+
+ execute "normal! ggVG\<esc>"
+ SendSelectionToTmuxTrimmed
+
+ call winrestview(view)
+endfunction
+
augroup ft_commonlisp
au!
@@ -832,13 +880,13 @@
" \c - send ctrl-l [c]lear
" Send the current form to the REPL
- au FileType lisp nnoremap <buffer> <silent> <localleader>f :let lisp_tslime_view = winsaveview()<cr>vab"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr>
+ au FileType lisp nnoremap <buffer> <silent> <localleader>f :call SendLispForm()<cr>
" Send the current top-level form to the REPL
- au FileType lisp nnoremap <buffer> <silent> <localleader>e :let lisp_tslime_view = winsaveview()<cr>:silent! normal! l<cr>:call PareditFindDefunBck()<cr>vab"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr>
-
- " Send the entire buffer to the REPL
- au FileType lisp nnoremap <buffer> <silent> <localleader>r :let lisp_tslime_view = winsaveview()<cr>ggVG"ry:call SendToTmuxStripped(@r)<cr>:call winrestview(lisp_tslime_view)<cr>
+ au FileType lisp nnoremap <buffer> <silent> <localleader>e :call SendToplevelLispForm()<cr>
+
+ " Send the entire buffer to the REPL ([r]eload)
+ au FileType lisp nnoremap <buffer> <silent> <localleader>r :call SendLispBuffer()<cr>
" Clear the REPL
au FileType lisp nnoremap <buffer> <silent> <localleader>c :call SendToTmuxRaw("")<cr>
@@ -863,7 +911,7 @@
" ))
" Indent top-level form.
- au FileType lisp nmap <buffer> <localleader>= mz99[(v%='z
+ au FileType lisp nmap <buffer> gi mz99[(v%='z
" ])
augroup END
@@ -1330,6 +1378,8 @@
au syntax timl RainbowParenthesesLoadSquare
au syntax timl RainbowParenthesesLoadBraces
+ au FileType timl call PareditInitBuffer()
+
" Friendlier Paredit mappings.
au FileType timl noremap <buffer> () :<c-u>call PareditWrap("(", ")")<cr>
au FileType timl noremap <buffer> )( :<c-u>call PareditSplice()<cr>
@@ -1341,10 +1391,8 @@
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
+ au FileType timl nmap <buffer> gi mz99[(v%='z
" ])
augroup END
@@ -1507,6 +1555,11 @@
" "Hub"
vnoremap <leader>H :Gbrowse<cr>
+nnoremap <leader>H V:Gbrowse<cr>
+
+" "(Upstream) Hub"
+vnoremap <leader>u :Gbrowse @upstream<cr>
+nnoremap <leader>u V:Gbrowse @upstream<cr>
" }}}
" GnuPG {{{
@@ -1735,6 +1788,11 @@
let g:tslime_vars_mapping = '<localleader>t'
" }}}
+" tslime2 {{{
+
+let g:tslime2_ensure_trailing_newlines = 1
+
+" }}}
" YankRing {{{
function! YRRunAfterMaps()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/weechat/python/autoload/quotes.py Thu Dec 18 21:59:14 2014 -0500
@@ -0,0 +1,100 @@
+import subprocess
+
+SCRIPT_NAME = 'quotes'
+SCRIPT_AUTHOR = 'Steve Losh <steve@stevelosh.com>'
+SCRIPT_VERSION = '1.0'
+SCRIPT_LICENSE = 'MIT/X11'
+SCRIPT_DESC = 'Grab quotes and shove them into a text file.'
+SCRIPT_COMMAND = 'quo'
+SCRIPT_COMMAND_LONG = 'quoo'
+
+QUOTE_FILE = '/Users/sjl/Dropbox/quotes.txt'
+
+import_ok = True
+
+try:
+ import weechat
+except ImportError:
+ print 'This is a weechat script, what are you doing, run it in weechat, jesus'
+ import_ok = False
+
+weechat_version = 0
+
+def hd(fn, name, obj, attr):
+ return fn(weechat.hdata_get(name), obj, attr)
+
+def hdp(name, obj, attr):
+ return hd(weechat.hdata_pointer, name, obj, attr)
+
+def hds(name, obj, attr):
+ return hd(weechat.hdata_string, name, obj, attr)
+
+def get_lines(buffer, numlines):
+ lines = hdp("buffer", buffer, "own_lines")
+ if not lines:
+ # null pointer wat do
+ return None
+
+ last_lines = []
+
+ line = hdp("lines", lines, "last_line")
+ for _ in range(numlines):
+ if not line:
+ # shit we're at the top of the buffer
+ break
+
+ data = hdp("line", line, "data")
+ msg = hds("line_data", data, "message")
+ pre = hds("line_data", data, "prefix")
+
+ msg = weechat.string_remove_color(msg, "")
+ pre = weechat.string_remove_color(pre, "")
+
+ last_lines.append("<%s> %s" % (pre.strip(), msg.strip()))
+
+ line = hdp("line", line, "prev_line")
+
+ last_lines.reverse()
+ return last_lines
+
+def quote_grab(data, buffer, args, numlines=15):
+ lines = get_lines(buffer, numlines)
+
+ with open(QUOTE_FILE, 'a') as f:
+ f.write("\n---\n")
+ f.write('\n'.join(lines))
+
+ subprocess.call(["vim", QUOTE_FILE,
+ # start at the bottom of the file
+ "+",
+ # move up N lines, where N is how many we appended
+ "-c", "normal! %dk" % len(lines)])
+ weechat.command("", "/window refresh")
+
+ return weechat.WEECHAT_RC_OK
+
+def quote_grab_long(data, buffer, args):
+ return quote_grab(data, buffer, args, 75)
+
+if __name__ == '__main__' and import_ok:
+ if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION,
+ SCRIPT_LICENSE, SCRIPT_DESC, '', ''):
+ weechat_version = weechat.info_get('version_number', '') or 0
+ weechat.hook_command(
+ SCRIPT_COMMAND,
+ 'Appends the last 15 lines of the current buffer to your quotes '
+ 'file and opens it in Vim so you can trim it.',
+ '',
+ '',
+ '',
+ 'quote_grab',
+ '')
+ weechat.hook_command(
+ SCRIPT_COMMAND_LONG,
+ 'Appends the last 75 lines of the current buffer to your quotes '
+ 'file and opens it in Vim so you can trim it.',
+ '',
+ '',
+ '',
+ 'quote_grab_long',
+ '')
--- a/weechat/weechat.conf Thu Dec 18 21:59:00 2014 -0500
+++ b/weechat/weechat.conf Thu Dec 18 21:59:14 2014 -0500
@@ -35,8 +35,8 @@
day_change_message_1date = "-- %a, %d %b %Y --"
day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"
eat_newline_glitch = off
-highlight = "sjl,slosh,slj,clojerks"
-highlight_regex = "(^all[,:]|backend(ia)?[^s/]|red[- ]tape|steve ?losh|rob ford|(jesus )?fucking christ|bring me my [A-Za-z0-9_]+ (pant|breeche|kilt|skirt|short|jort|plort)s?|([[:<:]]((mother)?fuck([ie]ng?|er)?|(god?)?damn(ed)?|dammit|(bull|horse)?shite?)[[:>:]].*){3,})"
+highlight = "sjl,slosh,slj,clojerks,horrifying"
+highlight_regex = "(^all[,:]|backend(ia)?[^s/]|red[- ]tape|steve ?losh|rob ford|(jesus )?fucking christ|bring me my [A-Za-z0-9_]+ (pant|breeche|kilt|skirt|short|jort|plort)s?|(horse|mouse|clown)fuckers?|([[:<:]]((mother)?fuck([ie]ng?|er)?|(god?)?damn(ed)?|dammit|(bull|horse)?shite?)[[:>:]].*){3,}|actual footage)"
highlight_tags = ""
hotlist_add_buffer_if_away = on
hotlist_buffer_separator = ", "
@@ -88,7 +88,7 @@
read_marker_always_show = on
read_marker_string = "◡◡◠"
save_config_on_exit = off
-save_layout_on_exit = none
+save_layout_on_exit = "all"
scroll_amount = 3
scroll_bottom_after_switch = off
scroll_page_percent = 100