4 ms·
Using the article completion method it turns out that I can no longer use <tab> to insert a <tab> since it displays a list of word to be completed. It might be
by johnchristopher 14y ago
Using the article completion method it turns out that I can no longer use <tab> to insert a <tab> since it displays a list of word to be completed.
It might be due to my vim configuration but I doubt it (though I am not a vim script expert by any means).
Here is a function I found on the web a long time ago and that seems to prevent that problem:
inoremap <Tab> <C-R>=MyTabOrComplete()<CR>
function MyTabOrComplete()
let col = col('.')-1
if !col || getline('.')[col-1] !~ '\k'
return "\<tab>"
else
return "\<C-N>"
endif
endfunction
No idea how it really works, I never investigated.
Credits/source: http://www.slideshare.net/andreizm/vim-for-php-programmers-pdf http://www.slideshare.net/andreizm/vim-for-php-programmers-p... slide 44
edit: formating and credits