commit edbff6109e00527e3c84d4d36f86b76bbdfa9d76 Author: Dan Barber Date: Wed Nov 25 18:06:42 2015 +0000 Initial commit This should be reasonably close to my original forked thoughtbot dotfiles configuration. I'm sure there will be some tweaks required! diff --git a/aliases.local b/aliases.local new file mode 100644 index 0000000..f3264c6 --- /dev/null +++ b/aliases.local @@ -0,0 +1,9 @@ +# git +alias pullate="git pull" +alias pushate="git push" + +alias fetchate="git fetch" +alias rebasate="git rebase" + +# Bundler +alias be="bundle exec" diff --git a/gitconfig.local b/gitconfig.local new file mode 100644 index 0000000..596637c --- /dev/null +++ b/gitconfig.local @@ -0,0 +1,4 @@ +[format] + pretty = %Cblue%h%Creset %Cgreen[%ar]%Creset (%an) %s +[include] + path = .gitconfig.author diff --git a/gvimrc.local b/gvimrc.local new file mode 100644 index 0000000..df948f4 --- /dev/null +++ b/gvimrc.local @@ -0,0 +1,16 @@ +" Remove scrollbars +set guioptions-=R +set guioptions-=r +set guioptions-=L +set guioptions-=l + +" Set GUI font according to OS +if has("gui_macvim") + set guifont=Source\ Code\ Pro:h14 +elseif has("gui_gtk2") + set guifont=Source\ Code\ Pro\ 10 +endif + +" Color scheme +set background=dark +colorscheme Solarized diff --git a/vim/vimrc.d.vim b/vim/vimrc.d.vim new file mode 100644 index 0000000..c524511 --- /dev/null +++ b/vim/vimrc.d.vim @@ -0,0 +1,3 @@ +for f in split(glob('~/.vim/vimrc.d/*.vim'), '\n') + exe 'source' f +endfor diff --git a/vim/vimrc.d/airline.vim b/vim/vimrc.d/airline.vim new file mode 100644 index 0000000..ec19a3d --- /dev/null +++ b/vim/vimrc.d/airline.vim @@ -0,0 +1,10 @@ +let g:airline_left_sep=' ' +let g:airline_right_sep=' ' + +let g:airline_enable_syntastic=0 +let g:airline_theme='solarized' +let g:airline_powerline_fonts=0 +let g:airline_linecolumn_prefix = '␊ ' +let g:airline_linecolumn_prefix = '␤ ' +let g:airline_linecolumn_prefix = '¶ ' +let g:airline_branch_prefix = '⎇ ' diff --git a/vim/vimrc.d/rails.vim b/vim/vimrc.d/rails.vim new file mode 100644 index 0000000..007127b --- /dev/null +++ b/vim/vimrc.d/rails.vim @@ -0,0 +1,12 @@ +" Set up some useful Rails.vim bindings for working with Backbone.js +autocmd User Rails Rnavcommand template app/assets/templates -glob=**/* -suffix=.mustache +autocmd User Rails Rnavcommand jmodel app/assets/javascripts/models -glob=**/* -suffix=.js.coffee +autocmd User Rails Rnavcommand jview app/assets/javascripts/views -glob=**/* -suffix=.js.coffee +autocmd User Rails Rnavcommand jcollection app/assets/javascripts/collections -glob=**/* -suffix=.js.coffee +autocmd User Rails Rnavcommand jrouter app/assets/javascripts/routers -glob=**/* -suffix=.js.coffee +autocmd User Rails Rnavcommand jspec spec/javascripts -glob=**/* -suffix=.js.coffee + +" Set up additional Rails.vim bindings +autocmd User Rails Rnavcommand concern app/concerns -glob=**/* -suffix=.rb +autocmd User Rails Rnavcommand decorator app/decorators -glob=**/* -suffix=_decorator.rb +autocmd User Rails Rnavcommand validator app/validators -glob=**/* -suffix=_validator.rb diff --git a/vim/vimrc.d/zencoding.vim b/vim/vimrc.d/zencoding.vim new file mode 100644 index 0000000..3e233e7 --- /dev/null +++ b/vim/vimrc.d/zencoding.vim @@ -0,0 +1,2 @@ +let g:user_zen_expandabbr_key = '' +" let g:use_zen_complete_tag = 1 diff --git a/vimrc.bundles.local b/vimrc.bundles.local new file mode 100644 index 0000000..4316240 --- /dev/null +++ b/vimrc.bundles.local @@ -0,0 +1,31 @@ +" Interface +Plug 'scrooloose/nerdtree' +Plug 'bling/vim-airline' + +" Language additions +Plug 'vim-ruby/vim-ruby' +Plug 'tpope/vim-haml' +Plug 'pangloss/vim-javascript' +Plug 'itspriddle/vim-jquery' +Plug 'leshill/vim-json' +Plug 'scrooloose/nerdcommenter' +Plug 'mattn/emmet-vim' +Plug 'briancollins/vim-jst' +Plug 'juvenn/mustache.vim' +Plug 'othree/html5.vim' +Plug 'tpope/vim-rbenv' + +Plug 'junegunn/goyo.vim' +Plug 'reedes/vim-pencil' + +" Todo +Plug 'davidoc/taskpaper.vim' + +" Colors +Plug 'altercation/vim-colors-solarized' +Plug 'vim-scripts/wombat256.vim' +Plug 'mrtazz/molokai.vim' +Plug 'chriskempson/tomorrow-theme', {'rtp': 'vim/'} +Plug 'shelling/railscasts.vim' +Plug 'nanotech/jellybeans.vim' +Plug 'morhetz/gruvbox' diff --git a/vimrc.local b/vimrc.local new file mode 100644 index 0000000..8d7a54e --- /dev/null +++ b/vimrc.local @@ -0,0 +1,29 @@ +" Color scheme +colorscheme Tomorrow-Night + +" Map ctrl-hjkl for easy window movement +map h +map j +map k +map l + +" Set backspace for consistent behaviour +set backspace=indent,eol + +" Tell Vim we're on a 256 color terminal +if $TERM == "xterm-256color" || $TERM == "screen-256color" || $COLORTERM == "gnome-terminal" + set t_Co=256 +endif + +" Tell NERDCommenter to put spaces in +let NERDSpaceDelims=1 + +" Setup vim-pencil +augroup pencil + autocmd! + autocmd FileType markdown,mkd call pencil#init() + autocmd FileType text call pencil#init() +augroup END + +" Extend plugins +source $HOME/.vim/vimrc.d.vim diff --git a/zsh/configs/prompt.zsh.local b/zsh/configs/prompt.zsh.local new file mode 100644 index 0000000..95ef27c --- /dev/null +++ b/zsh/configs/prompt.zsh.local @@ -0,0 +1,42 @@ +# gets whether git is currently dirty +git_dirty() { + git diff --ignore-submodules --quiet + if [[ $? == 1 ]]; then + echo "⭑" + else + git diff --staged --ignore-submodules --quiet + [[ $? == 1 ]] && echo "⭑" + fi +} + +# adds the current branch name in green +git_prompt_info() { + ref=$(git symbolic-ref HEAD 2> /dev/null) + if [[ -n $ref ]]; then + echo "%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}%{$fg_bold[red]%}$(git_dirty)%{$reset_color%} " + fi +} + +# adds the current ruby version in yellow +ruby_version() { + if (( $+commands[rbenv] )); then + ver=$(rbenv version |cut -d " " -f 1) + if [[ -n $ver ]]; then + echo "%{$fg[red]%}${ver}%{$reset_color%}" + fi + fi +} + +# makes color constants available +autoload -U colors +colors + +# enable colored output from ls, etc +export CLICOLOR=1 + +# expand functions in the prompt +setopt promptsubst + +# prompt +export PROMPT='$(git_prompt_info)${SSH_CONNECTION+"%{$fg[yellow]%}%n@%m%{$reset_color%}:"}%{$fg_bold[blue]%}%2c%{$reset_color%} %{$fg_bold[cyan]%}❯%{$reset_color%} ' +export RPROMPT='$(ruby_version)' diff --git a/zshrc.local b/zshrc.local new file mode 100644 index 0000000..aba93b0 --- /dev/null +++ b/zshrc.local @@ -0,0 +1,51 @@ +# ignore duplicate history entries +setopt histignoredups + +# keep TONS of history +export HISTFILE=$HOME/.zsh_history +export HISTSIZE=4096 +export SAVEHIST=4096 + +# shared history +setopt append_history +setopt inc_append_history +setopt share_history + +# automatically pushd +setopt auto_pushd +export dirstacksize=5 + +# Case insensitive completion +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +# Enable completion menu +zstyle ':completion:*' menu select=1 _complete _ignored _approximate + +# Enable rbenv +if (( $+commands[rbenv] )); then + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" +fi + +# Node stuff +export PATH=/usr/local/share/npm/bin:$PATH +export NODE_PATH=/usr/local/lib/node_modules + +# Enable direnv +if (( $+commands[direnv] )); then + #eval `direnv hook $0` + _direnv_hook() { + eval "$(direnv export $0)"; + } + typeset -a precmd_functions + if [[ -z $precmd_functions[(r)_direnv_hook] ]]; then + precmd_functions+=_direnv_hook; + fi + # Make direnv use the system ruby. https://github.com/zimbatm/direnv/issues/42 + export DIRENV_RUBY=/usr/bin/ruby +fi + +# Environment config +[[ -f ~/.zshrc.env ]] && source ~/.zshrc.env + +eval "$(thefuck --alias)"