Closed justrajdeep closed 8 years ago
Cmd2Complete only works for /
and ?
search mode. To prevent :e <Tab>
from printing ^I
, you have to set wildcharm=<Tab>
and it will default to the normal wildmode.
To use Cmd2 with :
, you have to use Cmd2Suggest.
Hi GelGuy
I have the following in my .vimrc
let g:Cmd2_options = {
\ '_complete_ignorecase': 1,
\ '_complete_uniq_ignorecase': 0,
\ '_complete_fuzzy': 0,
\ }
cmap <expr> <Tab> Cmd2#ext#complete#InContext() ? "\<Plug>(Cmd2Complete)" : "\<Tab>"
set wildcharm=<Tab>
I also have set in my .vimrc
wildchar=<TAB>
Would that create an issue?
EDIT:
just to clarify it works perfectly with :%s
, /
and ?
The :
mode is not available using <Plug>(Cmd2Complete)
, since it will just be a reimplementation of wildmenu.
Do you have wildmenu enabled with set wildmenu
? If you do not, then ^I
appearing is Vim's standard behaviour.
If you want :
completion, you have to use Cmd2Suggest which provides autocompletion as you type. :
mode is still experimental so there might be some bugs.
Hi GelGuy
i have wildmenu
set in my .vimrc
In fact i have
set wildmode=list:longest,full
i dont want :
completion, i want to default it to vim wildmenu
.
Just curious how it works for :%s
?
Cmd2#ext#complete#InContext()
checks if the commandline is in /
, ?
or :s
context.
I am unable to reproduce this issue. There might be another mapping conflicting with <Tab>
.
Use :verbose cmap <Tab>
to check.
Otherwise provide a minimal .vimrc, together with your Vim version, terminal or GUI and OS.
Hi GelGuy
I figured out the issue. I had the below mapping in my .vimrc
set wcm=<C-Z>
because it was abbreviated wcm
i did not realize it was wildcharm
.
That was causing all the issues. Now the plugin works like a charm.
Sorry for all the trouble.
Hi
If i enable it with
And then try
it just prints
^I