Skip to content

Commit

Permalink
Merge branch 'master' of github.com:akahn/dotfiles
Browse files Browse the repository at this point in the history
* 'master' of github.com:akahn/dotfiles:
  Add tab autocompletion ala @garybernhardt
  Make :Gbrowse work
  Add some aliases
  Remove autojump.vim
  Load git completion
  Add nerdcommenter
  • Loading branch information
akahn committed Sep 26, 2011
2 parents 0d98156 + fe6b490 commit 04a4e59
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .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
Expand All @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions .gitconfig
Expand Up @@ -44,3 +44,5 @@

[rerere]
enabled = 1
[web]
browser = open
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -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
1 change: 0 additions & 1 deletion .vim/bundle/autojump.vim
Submodule autojump.vim deleted from c312a3
1 change: 1 addition & 0 deletions .vim/bundle/nerdcommenter
Submodule nerdcommenter added at b28e7b
13 changes: 12 additions & 1 deletion .vimrc
Expand Up @@ -82,7 +82,18 @@ nnoremap gp `[v`]
" Open Gundo window
nnoremap <Leader>u :GundoToggle<CR>

" 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 "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
inoremap <s-tab> <c-n>
" Don't allow accidental `:Git commit` to spawn vim
autocmd GUIEnter * let $GIT_EDITOR = 'false'

0 comments on commit 04a4e59

Please sign in to comment.