bodil / vscode-file-browser

https://marketplace.visualstudio.com/items?itemName=bodil.file-browser
GNU Lesser General Public License v3.0
87 stars 22 forks source link

Implement auto completion #3

Closed stevenguh closed 4 years ago

stevenguh commented 4 years ago

This is a basic implementation of tab completion. It was deliberate to not include the feature to tab into directory directly when there is only one match, because that would prevent people from using the autocomplete and with the Ctrl+A menu to open that folder.

stevenguh commented 4 years ago

4 adds support for performing actions right after stepping into a folder. If we have that, then I think it makes sense to add the support to tab directly into the directory if there's one match that's start with the input value. (btw, I already have that ready to go. Let me know if you prefer one PR than these parallelized PR)

bodil commented 4 years ago

Heh, I decided that because I can't find what the built-in matcher has decided to be the best match, this couldn't be implemented nicely, but thinking back on it I'm not the least bit sure this implementation isn't a perfectly acceptable substitute.

Yes, please, could you put everything, including the proposed feature, into a single PR? It makes it easier to review it and tweak it if necessary.

stevenguh commented 4 years ago

Updated this PR with all of the changes including bugfix and the tabbing directing into directory if there's only one match.

All the changes:

A sidenote: Is there any reason why the input box is not a full url like helm?

bodil commented 4 years ago

This works magnificently. Merging, thx!

bodil commented 4 years ago

As to the question of why the input box isn't showing the full path, it's because that would mean showing the full path for every item too, given the way matching works, and that would be extremely noisy. The compromise was to show the path in the quick pick's title instead.