Skip to content

Instantly share code, notes, and snippets.

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