How to select SuperTab completion suggestion without creating new line?
Asked Answered
P

2

10

When I hit Enter on SuperTab's popup suggestion, it automatically creates a new line at the end of the inserted keyword.

Is it possible to select an option in the SuperTab popup without creating a new line?

More specifically, is there a way for me to configure space as the method of selecting the code completion suggestion?

Perineurium answered 23/10, 2011 at 23:40 Comment(0)
D
8
inoremap <expr> <Space> pumvisible() ? "\<C-y>" : " "

Note the <C-y> that accepts currently selected option, you may want to use it directly instead of remapping space. You will see more in :h popupmenu-keys.

Domingo answered 24/10, 2011 at 4:37 Comment(0)
C
6

Put this in your .vimrc

let g:SuperTabCrMapping=1
Cementum answered 21/2, 2015 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.