VimCompletesMe
VimCompletesMe copied to clipboard
<S-Tab> completion
Hi,
Is it currently possible to configure <S-Tab> to start completion in the opposite direction of <Tab>?
So with let g:vcm_direction = 'n', <S-Tab> would start completion backwards.
It does that already. Do you have something else mapped to Shift Tab?
i <S-Tab> <Plug>vim_completes_me_backward
and an example:
find
f<(s-)tab> always proposes find first, never for
for
I'm confused.
If I have the file as:
- foo
- bar
- find
- for
- f
and then type Shift-Tab after "f" on line 5, I get the popup. Then pressing Shift-tab again, the completion for "for" is selected.
Is that not what you're seeing or am I misunderstanding your question?
The default behaviour for the plugin is to get the preceding word when using <tab>.
<s-tab> should do the opposite.
In your example 'foo' should be selected.
Another one:
- foo
- f
<tab>-> foo, f<s-tab>-> find - find
I see what you're saying now.
But, the plugin only uses the existing behavior of Ctrl-X_Ctrl-N/P. The vcm_direction variable, then, controls the selection direction inside the popup window.
In your previous example, if you had configured let g:vcm_direction = 'p', it would have selected "foo" after pressing shift-tab after "f" on line 2.