Skip to content

Commit

Permalink
Use Gary Bernhardt tab setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Croak committed May 7, 2012
1 parent 751d507 commit 22fca8f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ let g:snippetsEmu_key = "<S-Tab>"
set wildmode=list:longest,list:full
set complete=.,w,t

" Indent if we're at the beginning of a line. Else, do 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>
" Tags
let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"

Expand Down

0 comments on commit 22fca8f

Please sign in to comment.