diff --git a/.bash_profile b/.bash_profile index 0b670a4..6d7be13 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,6 +1,8 @@ HISTFILESIZE=1000000000 HISTSIZE=1000000 +source /usr/local/etc/bash_completion.d/git-completion.bash + export PAGER=vimpager export GIT_PAGER=less export RUBYOPT=rubygems @@ -24,6 +26,10 @@ alias b='bundle exec' alias pbindent='pbpaste | sed "s/^/ /" | pbcopy' alias itunes='open -a iTunes' +alias rtest="ruby -I test" + +gemcd() { cd "$(gem open -e echo $1)" } + function psgrep { ps aux | grep $1 | grep -v grep } diff --git a/.gitconfig b/.gitconfig index 0fe78e6..b60630c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -44,3 +44,5 @@ [rerere] enabled = 1 +[web] + browser = open diff --git a/.gitmodules b/.gitmodules index 1e1a840..adea1e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule ".vim/bundle/solarized"] path = .vim/bundle/solarized url = https://github.com/altercation/vim-colors-solarized.git +[submodule ".vim/bundle/nerdcommenter"] + path = .vim/bundle/nerdcommenter + url = https://github.com/scrooloose/nerdcommenter.git diff --git a/.vim/bundle/autojump.vim b/.vim/bundle/autojump.vim deleted file mode 160000 index c312a36..0000000 --- a/.vim/bundle/autojump.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c312a369ae59904f53a851a8d4e76f725a6ebcdc diff --git a/.vim/bundle/nerdcommenter b/.vim/bundle/nerdcommenter new file mode 160000 index 0000000..b28e7be --- /dev/null +++ b/.vim/bundle/nerdcommenter @@ -0,0 +1 @@ +Subproject commit b28e7be63235982501ab7dd30c03ea7feef7b095 diff --git a/.vimrc b/.vimrc index 2ab4b05..741cd75 100644 --- a/.vimrc +++ b/.vimrc @@ -82,7 +82,18 @@ nnoremap gp `[v`] " Open Gundo window nnoremap u :GundoToggle - +" Remap the tab key to do autocompletion or indentation depending on the +" context (from http://vim.wikia.com/wiki/Smart_mapping_for_tab_completion) +function! InsertTabWrapper() + let col = col('.') - 1 + if !col || getline('.')[col - 1] !~ '\k' + return "\" + else + return "\" + endif +endfunction +inoremap =InsertTabWrapper() +inoremap " Don't allow accidental `:Git commit` to spawn vim autocmd GUIEnter * let $GIT_EDITOR = 'false'