Yeah. The standard for Vim code completion is YCM (
https://github.com/ycm-core/YouCompleteMe) which, as you said requires Python and a local node server. The reason is so that everything runs off the server and is a super quick call instead of hogging up your vim config stuff - I have used it before, it actually works okay.
Nowadays though, I just use VIM's built in autocomplete which is pretty good. I simply remap the default autocomplete keys to tab and set up a function to autocomplete with tab if im in the middle of a word, otherwise it defaults to normal tab functionality.
9 lines and a true handmade solution :-)
1
2
3
4
5
6
7
8
9
10
11
12 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-n>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|