mirror of
https://github.com/danbee/dotfiles-local
synced 2025-03-04 08:49:07 +00:00
Initial commit
This should be reasonably close to my original forked thoughtbot dotfiles configuration. I'm sure there will be some tweaks required!
This commit is contained in:
commit
edbff6109e
9
aliases.local
Normal file
9
aliases.local
Normal file
@ -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"
|
||||
4
gitconfig.local
Normal file
4
gitconfig.local
Normal file
@ -0,0 +1,4 @@
|
||||
[format]
|
||||
pretty = %Cblue%h%Creset %Cgreen[%ar]%Creset (%an) %s
|
||||
[include]
|
||||
path = .gitconfig.author
|
||||
16
gvimrc.local
Normal file
16
gvimrc.local
Normal file
@ -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
|
||||
3
vim/vimrc.d.vim
Normal file
3
vim/vimrc.d.vim
Normal file
@ -0,0 +1,3 @@
|
||||
for f in split(glob('~/.vim/vimrc.d/*.vim'), '\n')
|
||||
exe 'source' f
|
||||
endfor
|
||||
10
vim/vimrc.d/airline.vim
Normal file
10
vim/vimrc.d/airline.vim
Normal file
@ -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 = '⎇ '
|
||||
12
vim/vimrc.d/rails.vim
Normal file
12
vim/vimrc.d/rails.vim
Normal file
@ -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
|
||||
2
vim/vimrc.d/zencoding.vim
Normal file
2
vim/vimrc.d/zencoding.vim
Normal file
@ -0,0 +1,2 @@
|
||||
let g:user_zen_expandabbr_key = '<c-e>'
|
||||
" let g:use_zen_complete_tag = 1
|
||||
31
vimrc.bundles.local
Normal file
31
vimrc.bundles.local
Normal file
@ -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'
|
||||
29
vimrc.local
Normal file
29
vimrc.local
Normal file
@ -0,0 +1,29 @@
|
||||
" Color scheme
|
||||
colorscheme Tomorrow-Night
|
||||
|
||||
" Map ctrl-hjkl for easy window movement
|
||||
map <c-h> <c-w>h
|
||||
map <c-j> <c-w>j
|
||||
map <c-k> <c-w>k
|
||||
map <c-l> <c-w>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
|
||||
42
zsh/configs/prompt.zsh.local
Normal file
42
zsh/configs/prompt.zsh.local
Normal file
@ -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)'
|
||||
51
zshrc.local
Normal file
51
zshrc.local
Normal file
@ -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)"
|
||||
Loading…
Reference in New Issue
Block a user