Tab completion
This commit is contained in:
parent
c86cb20422
commit
981cc04743
1 changed files with 10 additions and 0 deletions
10
vim/.vimrc
10
vim/.vimrc
|
|
@ -129,3 +129,13 @@ map <silent> <C-E> :call ToggleVExplorer()<CR>
|
|||
|
||||
"Open quickfix window
|
||||
map <F3> :copen <CR>
|
||||
|
||||
function! Tab_Or_Complete()
|
||||
if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
|
||||
return "\<C-N>"
|
||||
else
|
||||
return "\<Tab>"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
inoremap <Tab> <C-R>=Tab_Or_Complete()<CR>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue