neolistic wrote:
Hello!
I have redefined the <Tab> key in insert mode for the completion:
inoremap <Tab> <C-R>=CleverTab()<CR>

However I want that the <S-Tab> (Shift+Tab) key in insert mode insert a real
tabulation but I don't know how to do this redefinition

Thank you for your help

If the shift-tab key is passed to your version of Vim and it recognizes it as such,

        :inoremap <S-Tab> <Tab>

should do the trick. (Noremapping is essential here, considering your mapping to CleverTab() ).

If the shift-tab key is not passed to Vim, or passed as something else (such as <Tab>) you're out of luck.

If Vim gets a recognizable shift-tab, then hitting (in Insert mode) Ctrl-K followed by Shift-Tab should insert the seven characters <S-Tab> into the current buffer.


Best regards,
Tony.

Reply via email to