When I loop through the list of completion alternatives via supertab (i.e. activated by pressing <TAB>
), the selection starts at the end of the list and cycles upwards when repeatedly pressing <TAB>
or <C-n>
. Pressing <S-TAB>
or <C-p>
cycles downwards.
The opposite behaviour, which I find more convenient, happens when the automatic completion is activated by the vim built-in (?), using <C-x><C-n>
. Then <C-n>
cycles downwards and <C-p>
upwards.
I'm not too knowledgeable about vim. How can I fix this?
This is because SuperTab's default completion is <C-p>
, which cycles backwards (so matches before, not after the cursor are presented first, which is usually what you want). As documented, you can change that via:
let g:SuperTabDefaultCompletionType = "<c-n>"
(Put this into your ~/.vimrc
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With