When comparing YouCompleteMe vs TabNine, the Slant community recommends YouCompleteMe for most people. In the question“What are the best semantic autocompletion plugins for Vim?” YouCompleteMe is ranked 2nd while TabNine is ranked 3rd. The most important reason people chose YouCompleteMe is:
Maybe use this: let g:ycm_add_preview_to_completeopt = 1 let g:ycm_autoclose_preview_window_after_completion = 1 nnoremap <leader>d :YcmCompleter GetDoc<CR> nnoremap <leader>j :YcmCompleter GoTo<CR>
Ranked in these QuestionsQuestion Ranking
Pro Works out-of-the box, not much configuration work necessary
Maybe use this:
let g:ycm_add_preview_to_completeopt = 1
let g:ycm_autoclose_preview_window_after_completion = 1
nnoremap <leader>d :YcmCompleter GetDoc<CR>
nnoremap <leader>j :YcmCompleter GoTo<CR>
Pro Clang code completion
Pro Good fuzzy completion
Pro Multiple ways to complete. Multi language support
Pro Suggestions are truly context-aware
TabNine recognizes code intelligently by applying machine learning techniques to your codebase. It can generalize from only two examples, suggest completions based on lines of code before it, and even suggest completions for comments.
Pro Compatible with other editors
Apart from vim, you can use TabNine with Sublime Text, VS Code, and Atom.
Pro Extremely fast
TabNine can suggest completions extremely fast — they pop-up immediately after you type a letter with no noticeable lag, compared to some other completion plugins. It promises ~20ms response time when auto-completing anything, and it's built on Rust where speed and memory-efficiency are first-class citizens of the language and ecosystem.
Pro License keys are one-time purchases
You can purchase a license key for $29 and receive free updates — there's no subscription models of any sort. The license key can also be used multiple times, on various other supported editors, since they're not locked to a single installation or machine.
Pro Works with any language
TabNine can provide suggestions for any language, thanks to the way TabNine's completion engine works.
Pro Single-plugin install with no other dependencies
All you need to use TabNine is install the vim plugin. It doesn't require any external dependencies, binaries, packages, language servers, etc.
Pro Paid features available for free when working with Rust code
The developers made paid features always available for free when auto-completing Rust code, in acknowledgment of how TabNine is made possible by the Rust ecosystem.
Pro Works out of the box
TabNine literally requires no configuration at all — it works as advertised out of the box.
Con Too many dependencies
Compared to others, it has too many dependencies.
Con Does not have function arguments quick-preview (for Python)
You need to check the Docs too see how a function is defined.
Con Extremely heavyweight
YouCompleteMe installations are hundreds of megabytes large.
Con No Julia support
Only Deoplete seems to have that at the moment.
Con Works best only with C family languages
YouCompleteMe works best for C-based languages (C, C++, Objective-C, Objective-C++) and it's semantic engine is Clang-based which means that it only works for the C-family languages.
The TabNine binary required by the vim plugin is proprietary, and subject to TabNine's EULA.
Con Free version is severely limited
The free version can only really provide suggestions for small projects not exceeding 200KB in file sizes. Once you hit the limit, it only provide suggestions partially. This is due to the way TabNine works — it builds an index of your project and gives suggestions based on that, and 200KB is the index limit for the free version.