Skip to content

Instantly share code, notes, and snippets.

@Shougo
Created March 3, 2010 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Shougo/320303 to your computer and use it in GitHub Desktop.
Save Shougo/320303 to your computer and use it in GitHub Desktop.
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<TAB>" : "\<C-x>\<C-u>\<C-p>"
function! s:check_back_space()"{{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment