map <S-TAB> to to tab key

2k Views Asked by At

I'm using the vim plugin supertab to map the <TAB> key to autocompletion, I however, sometimes want the old tab functionality (to indent at the end of a word), and wanted to map it to <S-TAB>, but I can't seem to make it work.

The documentation states there is g:SuperTabMappingTabLiteral, which I can set, to get the old tab functionality back. I set it to let g:SuperTabMappingTabLiteral = '<s-tab>' but that doesn't seem to work either.

The other questions on SO are about how to get a literal tab character with supertab enabled, I don't want a literal tab.

1

There are 1 best solutions below

0
On BEST ANSWER

Put this just after your plugin manager

runtime! plugin/supertab.vim

then

inoremap <s-tab> <tab>

should work. Just tested it in my vimrc, the problem was than supertab overrides the mapping.