Vim Supertab plugin changes direction when navigating the completion menu

When I iterate over the list of termination alternatives via supertab (i.e., it is activated by pressing <TAB> ), the selection starts at the end of the list and cyclically increases when you press <TAB> or <Cn> again. Pressing <S-TAB> or <Cp> is performed down.

The opposite behavior, which I find more convenient, occurs when auto-completion is activated by the inline (?) Vim using <Cx><Cn> . Then <Cn> moves down and <Cp> up.

I don't know much about vim. How can i fix this?

+4
source share
1 answer

This is due to the fact that SuperTab is set to <Cp> by default, which cycles backward (so it matches earlier, and not after the cursor is displayed first, which is usually required). As stated in the document, you can change this via:

 let g:SuperTabDefaultCompletionType = "<cn>" 

(Put this in your ~/.vimrc .)

+8
source

Source: https://habr.com/ru/post/1486196/


All Articles