SuperTAB and YouCompleteMe compatibility

Posted by chunyang on December 26, 2019
TAGS: #tools

SuperTAB

SuperTAB Github

YouCompleteMe

YouCompleteMe Github

Problems

SuperTAB and YouCompleteMe are both awesome plugins for Vim.

  • SuperTAB completes using current context.
  • YouCompleteMe completes in a more complex way.

They both use the key TAB. SuperTAB uses TAB key to trigger completion, YouCompleteMe uses TAB to select the first item in the suggestion list.

By adding the following into your .vimrc

" auto close the completion window
let g:ycm_autoclose_preview_window_after_completion = 1
" only use the `Down` key to select the first item
let g:ycm_key_list_select_completion = ['<Down>']

Bingo! You can enjoy both.


Creative Commons License
This work is licensed under a CC A-S 4.0 International License.