hrsh7th / cmp-cmdline

nvim-cmp source for vim's cmdline
MIT License
567 stars 45 forks source link

Does not expand file path #15

Closed sparkcanon closed 2 years ago

sparkcanon commented 3 years ago

I am not sure if its just me but :e % does not expand % into the file path. This extends to something like :e %:h.

kting28 commented 2 years ago

It doesn't work for me either, if cmdline file path completion is enabled, e %<TAB> expands to %_file_path_ , which makes it not very useful as user needs to manually remove the % sign. Tab completion of e %:h plainly does not work

EdmundsEcho commented 2 years ago

Is there a way to have the suggestions only include files once we type :e? I might have a limited imagination, but I can't think of any other source for the autocomplete once it's clear we intend to open a file. Right?

tzachar commented 2 years ago

@EdmundsEcho Try cmp-fuzzy-path

hrsh7th commented 2 years ago

I think we can't fix this. because I can't know the <Tab> what should behave in such a case.

For example, :e<Tab> should display the completion menu but :e %<Tab> is not. The plugin author can't know whatever the behavior.