0

i'm looking for a way to trigger SuperTab when writing a . (dot) in insert mode. I came up with something like this:

inoremap <buffer> . .<C-x><C-o>

But this just triggers Omnicompletion and not SuperTab. I want it to trigger SuperTab so I have my SuperTab configuration (preselect first entry, autoclose preview window). Also I still want my normal SuperTab binding (which is Tab).

This could probably be solved by simulating a keypress (while in insert mode), but I just cant get it working.

inoremap <buffer> . .<Tab>

Just inserts a literal tab. Any hints?

Thanks!

4

1 回答 1

2

inoremap确切的意思是:

:ino[remap] {lhs} {rhs}

将键序列映射{lhs}{rhs}map 命令适用的模式。禁止,的映射 {rhs},以避免嵌套和递归映射。

你有没有尝试过:

:imap . .<tab>

?

于 2012-11-28T14:08:51.163 回答