From 78625a15b5b73640293b3a77316377e9bd807844 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Fri, 10 Jan 2014 09:00:46 -0600 Subject: [PATCH] Initial commit of dotfiles. --- .bash_profile | 38 ++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + .inputrc | 6 ++++++ .vimrc | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 .bash_profile create mode 100644 .gitignore create mode 100644 .inputrc create mode 100644 .vimrc diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..442c2ba --- /dev/null +++ b/.bash_profile @@ -0,0 +1,38 @@ +# +# .bash_profile +# +# @author Jeff Geerling +# @see .inputrc +# + +# Nicer prompt. +export PS1=" \D{%I:%M %p}:\w $ " + +# Use colors. +export CLICOLOR=1 +export LSCOLORS=ExFxCxDxBxegedabagacad + +# Custom $PATH with extra locations. +export PATH=/usr/local/bin:/Users/jgeerling/bin:/usr/local/sbin:/usr/local/git/bin:/Developer/Eclipse/android-sdk-macosx/platform-tools:/Developer/Eclipse/android-sdk-macosx/tools:$PATH + +# Flush DNS cache (See: http://support.apple.com/kb/ht5343). +alias flush-dns='sudo killall -HUP mDNSResponder' + +# Include alias files for easier ssh and remote connections (private). +source ~/.bash_aliases + +# Route local traffic over ethernet when using certain WiFi networks w/o proxy. +function net_route() { + sudo route add -net 10.0.0.0/8 -interface en3 +} + +# Git aliases. +alias gs='git status' +alias gc='git commit' +alias gcam='git commit -am' +alias gl='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' + +# Turn on Git autocomplete. +if [ -f ~/.git-completion.bash ]; then + . ~/.git-completion.bash +fi diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5509140 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.DS_Store diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..5c1c7d4 --- /dev/null +++ b/.inputrc @@ -0,0 +1,6 @@ +# Allow up/down autocompletion of commands from bash history. +# From: coderwall.com/p/oqtj8w +"\e[A": history-search-backward +"\e[B": history-search-forward +set show-all-if-ambiguous on +set completion-ignore-case on \ No newline at end of file diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..6fefbeb --- /dev/null +++ b/.vimrc @@ -0,0 +1,48 @@ +syntax on " enable syntax highlighting +set cursorline " highlight the current line +" set background=dark " darker color scheme +" set ruler " show line number in bar +set nobackup " don't create pointless backup files; Use VCS instead +set autoread " watch for file changes +set number " show line numbers +set showcmd " show selection metadata (like selected character count) +set showmode " show INSERT, VISUAL, etc. mode +set showmatch " show matching brackets +set autoindent smartindent " auto/smart indent +set smarttab " better backspace and tab functionality +set scrolloff=5 " show at least 5 lines above/below +filetype on " enable filetype detection +filetype indent on " enable filetype-specific indenting +filetype plugin on " enable filetype-specific plugins +colorscheme cobalt " requires cobalt.vim to be in ~/.vim/colors + +" tabs and indenting +set autoindent " auto indenting +set smartindent " smart indenting +set expandtab " spaces instead of tabs +set tabstop=2 " 2 spaces for tabs +set shiftwidth=2 " 2 spaces for indentation + +" bells +set noerrorbells " turn off audio bell +set visualbell " but leave on a visual bell + +" search +set hlsearch " highlighted search results +set showmatch " show matching bracket + +" other +set guioptions=aAace " don't show scrollbar in MacVim +call pathogen#infect() " use pathogen + +" clipboard +set clipboard=unnamed " allow yy, etc. to interact with OS X clipboard + +" shortcuts +map :NERDTreeToggle + +" remapped keys +inoremap { {} +inoremap { {}O +inoremap {{ { +inoremap {} {}