简体   繁体   中英

Fuzzy file opening in vscode

I am exploring vscode after using atom for a long while. One of the things I'm missing is an equivalent of the lovely package advanced-open-file . Is there something similar to this in vscode?

I found the advanced-new-file extension, but it is only helpful when it comes to new files. I would like to be able to quickly open files from all over my local files (not only the workspace).

Edit: I found the option of workbench.action.quickOpen ; but it doesn't allow opening files from the whole file system.

Sorry, but currently the answer is no. The problem is that input box doesn't provide a way to listen to key events: GitHub issue , so even the extensions can't do that currently. Here's the comment from advanced-new-file extension creator:

Because VSCode extensions don't yet have the ability to do type-ahead autocomplete within the text input box (See https://github.com/Microsoft/vscode/issues/426 ), we work around this limitation and provide autocomplete using a two-step workflow of selecting existing path, then providing new filename/path relative to the selection.

The good news is that there is a new API addressing this issue, but it's currently in 'proposed' state and can't be used for published extensions.

One workaround could be typing code -r some/path in integrated terminal and using 'tab' for autocomplete.

The Fuzzy search extension seems to work for me.

It adds a new action to the command palette which allows you to search for files in the current project and open them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM