Remove tab bind

This commit is contained in:
Sonny 2017-05-26 21:26:07 +02:00
parent ab6b33b3c9
commit 70b2282e89

View file

@ -88,27 +88,6 @@ vnoremap y "+y
vnoremap x "+x vnoremap x "+x
vnoremap c "+c vnoremap c "+c
"Built-in completion
function! Smart_TabComplete()
let line = getline('.') " current line
let substr = strpart(line, -1, col('.')+1) " from the start of the current
" of the cursor
let substr = matchstr(substr, "[^ \t]*$") " word till cursor
if (strlen(substr)==0) " nothing to match on empty string
return "\<tab>"
endif
let has_period = match(substr, '\.') != -1 " position of period, if any
let has_slash = match(substr, '\/') != -1 " position of slash, if any
if (!has_period && !has_slash)
return "\<C-X>\<C-P>" " existing text matching
elseif ( has_slash )
return "\<C-X>\<C-F>" " file matching
else
return "\<C-X>\<C-O>" " plugin matching
endif
endfunction
inoremap <tab> <c-r>=Smart_TabComplete()<CR>
" Plugins " Plugins
" Nerdtree " Nerdtree