Skip to content

Goto anything: preference nearby and open files #3040

@jimmo

Description

@jimmo

Problem description

I use Ctrl+P a lot to navigate to files, which works really well when combined with projects to set the search scope. However, most projects have files with similar (or duplicate names) in different paths. The default ordering of results means that the one I want is almost never at the top of the list.

Preferred solution

It would be great if the goto anything results could place "nearby" files at the top of the list (i.e. the path is "near" the current file).

So for example, in most cases, when I type Ctrl+P "Makef", I want the Makefile in the current directory, or the parent directory. And the rest of the time, the Makefile already open in another tab. I almost never want project_root/aaapath/Makefile.

Alternatives

Rather than resorting, just improving the default selection would go a long way. I'm not quite sure what the current behavior is, but it looks to be some combination of currently open and recently open. Maybe current/parent directory as an additional signal?

I saw #1555 but I understand why that isn't an option, and I don't really want to type ./ anyway.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions