--- a/.hgsub Thu Sep 17 16:37:39 2015 +0000
+++ b/.hgsub Thu Sep 17 16:38:02 2015 +0000
@@ -41,5 +41,6 @@
vim/bundle/syntastic = [git]git://github.com/scrooloose/syntastic.git
vim/bundle/timl = [git]git://github.com/tpope/timl.git
vim/bundle/tslime2 = [git]git://github.com/sjl/tslime2.vim.git
+vim/bundle/vimtex = [git]git://github.com/lervag/vimtex.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 Thu Sep 17 16:37:39 2015 +0000
+++ b/.hgsubstate Thu Sep 17 16:38:02 2015 +0000
@@ -41,5 +41,6 @@
47c70b3e1e388d8f9cc7c6d9687efc047df843ac vim/bundle/syntastic
01deb947b22201c8a3dfee5ae97b11228bd9cc36 vim/bundle/timl
d143308c5f385cce76dba5abf7b8b3737d711a4f vim/bundle/tslime2
+5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex
84365f56fc87c11f1f04eed487d256cf8b128f7c vim/bundle/vitality
a884f3a161fa3cd8c996eb53a3d1c68631f60c21 vim/bundle/yankring
--- a/bin/lein Thu Sep 17 16:37:39 2015 +0000
+++ b/bin/lein Thu Sep 17 16:38:02 2015 +0000
@@ -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.5.0"
+export LEIN_VERSION="2.5.2"
case $LEIN_VERSION in
*SNAPSHOT) SNAPSHOT="YES" ;;
@@ -23,6 +23,11 @@
cygwin=false
fi
+function command_not_found {
+ >&2 echo "Leiningen coundn't find $1 in your \$PATH ($PATH), which is required."
+ exit 1
+}
+
function make_native_path {
# ensure we have native paths
if $cygwin && [[ "$1" == /* ]]; then
@@ -65,7 +70,7 @@
fi
echo "Downloading Leiningen to $LEIN_JAR now..."
mkdir -p "$(dirname "$LEIN_JAR")"
- LEIN_URL="https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.jar"
+ LEIN_URL="https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip"
$HTTP_CLIENT "$LEIN_JAR.pending" "$LEIN_URL"
local exit_code=$?
if [ $exit_code == 0 ]; then
@@ -78,7 +83,7 @@
fi
}
-if [ `id -u` -eq 0 ] && [ "$LEIN_ROOT" = "" ]; then
+if [ "$(id -u)" -eq 0 ] && [ "$LEIN_ROOT" = "" ]; then
echo "WARNING: You're currently running as root; probably by accident."
echo "Press control-C to abort or Enter to continue as root."
echo "Set LEIN_ROOT to disable this warning."
@@ -98,29 +103,32 @@
export LEIN_HOME="${LEIN_HOME:-"$HOME/.lein"}"
-for f in "$LEIN_HOME/leinrc" ".leinrc"; do
+for f in "/etc/leinrc" "$LEIN_HOME/leinrc" ".leinrc"; do
if [ -e "$f" ]; then
source "$f"
fi
done
if $cygwin; then
- export LEIN_HOME=`cygpath -w "$LEIN_HOME"`
+ export LEIN_HOME=$(cygpath -w "$LEIN_HOME")
fi
LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.jar"
# normalize $0 on certain BSDs
if [ "$(dirname "$0")" = "." ]; then
- SCRIPT="$(which $(basename "$0"))"
+ SCRIPT="$(which "$(basename "$0")")"
+ if [ -z "$SCRIPT" ]; then
+ SCRIPT="$0"
+ fi
else
SCRIPT="$0"
fi
# resolve symlinks to the script itself portably
while [ -h "$SCRIPT" ] ; do
- ls=`ls -ld "$SCRIPT"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
+ ls=$(ls -ld "$SCRIPT")
+ link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
@@ -262,7 +270,7 @@
echo "Upgrading..."
TARGET="/tmp/lein-$$-upgrade"
if $cygwin; then
- TARGET=`cygpath -w $TARGET`
+ TARGET=$(cygpath -w "$TARGET")
fi
LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/$TARGET_VERSION/bin/lein"
$HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL"
@@ -284,7 +292,7 @@
else
if $cygwin; then
# When running on Cygwin, use Windows-style paths for java
- ORIGINAL_PWD=`cygpath -w "$ORIGINAL_PWD"`
+ ORIGINAL_PWD=$(cygpath -w "$ORIGINAL_PWD")
fi
# apply context specific CLASSPATH entries
@@ -292,7 +300,7 @@
add_path CLASSPATH "$(cat .lein-classpath)"
fi
- if [ $DEBUG ]; then
+ if [ -n "$DEBUG" ]; then
echo "Leiningen's classpath: $CLASSPATH"
fi
@@ -301,8 +309,17 @@
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")"
- export INPUT_CHECKSUM=$(echo $INPUTS | shasum - | cut -f 1 -d " ")
+ INPUTS="$* $(cat project.clj) $LEIN_VERSION $(test -f "$LEIN_HOME/profiles.clj" && cat "$LEIN_HOME/profiles.clj")"
+
+ if command -v shasum >/dev/null 2>&1; then
+ SUM="shasum"
+ elif command -v sha1sum >/dev/null 2>&1; then
+ SUM="sha1sum"
+ else
+ command_not_found "sha1sum or shasum"
+ fi
+
+ export INPUT_CHECKSUM=$(echo "$INPUTS" | $SUM | cut -f 1 -d " ")
# Just don't change :target-path in project.clj, mkay?
TRAMPOLINE_FILE="target/trampolines/$INPUT_CHECKSUM"
else
@@ -316,14 +333,14 @@
fi
if $cygwin; then
- TRAMPOLINE_FILE=`cygpath -w $TRAMPOLINE_FILE`
+ TRAMPOLINE_FILE=$(cygpath -w "$TRAMPOLINE_FILE")
fi
if [ "$INPUT_CHECKSUM" != "" ] && [ -r "$TRAMPOLINE_FILE" ]; then
- if [ $DEBUG ]; then
+ if [ -n "$DEBUG" ]; then
echo "Fast trampoline with $TRAMPOLINE_FILE."
fi
- exec sh -c "exec $(cat $TRAMPOLINE_FILE)"
+ exec sh -c "exec $(cat "$TRAMPOLINE_FILE")"
else
export TRAMPOLINE_FILE
"$LEIN_JAVA_CMD" \
@@ -346,9 +363,9 @@
## TODO: [ -r "$TRAMPOLINE_FILE" ] may be redundant? A trampoline file
## is always generated these days.
if [ -r "$TRAMPOLINE_FILE" ] && [ "$LEIN_TRAMPOLINE_WARMUP" = "" ]; then
- TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
+ TRAMPOLINE="$(cat "$TRAMPOLINE_FILE")"
if [ "$INPUT_CHECKSUM" = "" ]; then
- rm $TRAMPOLINE_FILE
+ rm "$TRAMPOLINE_FILE"
fi
if [ "$TRAMPOLINE" = "" ]; then
exit $EXIT_CODE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/loltex Thu Sep 17 16:38:02 2015 +0000
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+# what a joek
+set -e
+latexmk -C ${1}.latex
+latexmk -pdf ${1}.latex
+# open ${1}.pdf
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/banner.fish Thu Sep 17 16:38:02 2015 +0000
@@ -0,0 +1,3 @@
+function banner -d "Show a fun twitch banner"
+ figlet -f ogre -w9999 $argv | cowsay -W 9999 -n -p | lolcat
+end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fish/functions/ports.fish Thu Sep 17 16:38:02 2015 +0000
@@ -0,0 +1,3 @@
+function ports -d "List processes listening on various ports"
+ sudo lsof -iTCP -sTCP:LISTEN -P -n
+end
--- a/vim/custom-dictionary.utf-8.add Thu Sep 17 16:37:39 2015 +0000
+++ b/vim/custom-dictionary.utf-8.add Thu Sep 17 16:38:02 2015 +0000
@@ -173,3 +173,4 @@
monopod
gmail
inline
+NLP
--- a/vim/ftplugin/lisp/lispfolding.vim Thu Sep 17 16:37:39 2015 +0000
+++ b/vim/ftplugin/lisp/lispfolding.vim Thu Sep 17 16:38:02 2015 +0000
@@ -11,6 +11,8 @@
return ">1"
elseif getline(v:lnum) =~ '^\s*(defmacro.*\s'
return ">1"
+ elseif getline(v:lnum) =~ '^\s*(defmethod.*\s'
+ return ">1"
elseif getline(v:lnum) =~ '^\s*(defparameter.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(defvar.*\s'
--- a/vim/vimrc Thu Sep 17 16:37:39 2015 +0000
+++ b/vim/vimrc Thu Sep 17 16:38:02 2015 +0000
@@ -1411,6 +1411,9 @@
augroup ft_quickfix
au!
au Filetype qf setlocal colorcolumn=0 nolist nocursorline nowrap tw=0
+
+ " vimscript is a joke
+ au Filetype qf nnoremap <buffer> <cr> :execute "normal! \<lt>cr>"<cr>
augroup END
" }}}
@@ -2437,7 +2440,12 @@
diffupdate
endfunction " }}}
command! -nargs=0 HgDiff call s:HgDiff()
-nnoremap <leader>Hd :HgDiff<cr>
+
+" Diff the current file
+nnoremap <leader>hd :HgDiff<cr>
+
+" Diff the entire repo
+nnoremap <leader>hD :Clam hg diff<cr>:set ft=diff nowrap<cr>
function! s:HgBlame() " {{{
let fn = expand('%:p')
@@ -2459,7 +2467,16 @@
syncbind
endfunction " }}}
command! -nargs=0 HgBlame call s:HgBlame()
-nnoremap <leader>Hb :HgBlame<cr>
+nnoremap <leader>hb :HgBlame<cr>
+
+function! s:HgStatus() " {{{
+ Clam hg status
+endfunction " }}}
+command! -nargs=0 HgStatus call s:HgStatus()
+nnoremap <leader>hs :HgStatus<cr>
+
+" Bare hg commands
+nnoremap <leader>h<space> :!hg<space>
" }}}
" J {{{