diff --git a/.gitmodules b/.gitmodules index 0a479c5..a58d471 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,3 +30,6 @@ path = dotfiles/tmux/tmux-logging url = https://github.com/tmux-plugins/tmux-logging.git fetchRecurseSubmodules = true +[submodule "dotfiles/vim/pack/matir/start/syntastic"] + path = dotfiles/vim/pack/matir/start/syntastic + url = https://github.com/vim-syntastic/syntastic.git diff --git a/dotfiles/sqliterc b/dotfiles/sqliterc new file mode 100644 index 0000000..051f3e0 --- /dev/null +++ b/dotfiles/sqliterc @@ -0,0 +1,2 @@ +.header on +.mode column diff --git a/dotfiles/vim/pack/matir/start/syntastic b/dotfiles/vim/pack/matir/start/syntastic new file mode 160000 index 0000000..9f43dcb --- /dev/null +++ b/dotfiles/vim/pack/matir/start/syntastic @@ -0,0 +1 @@ +Subproject commit 9f43dcb5a244faba6aedb6879b75a56c7de4b8ff diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 25b2178..69fac7b 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -45,8 +45,6 @@ if $TERM ==? 'rxvt-unicode-256color' let g:solarized_use16=1 endif silent! colorscheme solarized8 -" Enable filetype support -filetype plugin indent on " Default ASM syntax for ft support let asmsyntax="nasm" " Allow file modelines @@ -142,3 +140,7 @@ command Unsmartquote %s/“\|”/"/g " Markdown options autocmd Filetype markdown set expandtab shiftwidth=4 + +" Enable filetype support +" Needs to be at end of vimrc +filetype plugin indent on diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 6a90144..320013c 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -27,7 +27,7 @@ PS1="%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])% zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # Load prezto -if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then +if [[ -z "${NO_ZPREZTO}" && -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi diff --git a/dotfiles/zshrc.d/crouton.zsh b/dotfiles/zshrc.d/crouton.zsh new file mode 100644 index 0000000..243dbab --- /dev/null +++ b/dotfiles/zshrc.d/crouton.zsh @@ -0,0 +1,7 @@ +if command -v xiwi >/dev/null 2>&1; then + function xiwibg { + local tmpf=$(mktemp) + echo Logging to ${tmpf} + nohup xiwi "$@" >!${tmpf} 2>&1 & + } +fi diff --git a/install.sh b/install.sh index 461cf12..72415d0 100755 --- a/install.sh +++ b/install.sh @@ -2,6 +2,7 @@ set -o nounset set -o errexit +set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash case $(uname) in Linux) @@ -48,17 +49,39 @@ prerequisites() { install_dotfile_dir() { local SRCDIR="${1}" local dotfile + local submodule_prune="$(git submodule status -- "${SRCDIR}" 2>/dev/null | \ + awk '{print $2}' | \ + while read submod ; do + echo -n " -o -path ${BASEDIR}/${submod}" + done)" find "${SRCDIR}" \( -name .git -o \ -path "${SRCDIR}/private_dotfiles" -o \ -name install.sh -o \ -name README.md -o \ - -name .gitignore \) \ + -name .gitignore \ + ${submodule_prune} \) \ -prune -o ${FINDTYPE} f -print | \ while read dotfile ; do local TARGET="${HOME}/.${dotfile#${SRCDIR}/}" - mkdir -p `dirname "${TARGET}"` + mkdir -p $(dirname "${TARGET}") ln -s -f "${dotfile}" "${TARGET}" done + git submodule status -- "${SRCDIR}" 2>/dev/null | \ + awk '{print $2}' | \ + while read submodule ; do + local FULLNAME="${BASEDIR}/${submodule}" + local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}" + mkdir -p $(dirname "${TARGET}") + if test -L "${TARGET}" ; then + if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then + echo "${TARGET} points to $(readlink "${TARGET}") not ${FULLNAME}!" >/dev/stderr + fi + elif test -d "${TARGET}" ; then + echo "rm -rf ${TARGET}" >/dev/stderr + else + ln -s -f "${FULLNAME}" "${TARGET}" + fi + done } install_basic_dir() {