Remove tab bind
This commit is contained in:
parent
ab6b33b3c9
commit
70b2282e89
1 changed files with 0 additions and 21 deletions
21
vim/.vimrc
21
vim/.vimrc
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue