Skip to content

[Feature Request] Open to / Hover on given file path #826

@hunkyburrito

Description

@hunkyburrito

Is your feature request related to a problem? Please describe.
Some external programs such as (neo)vim plugins or termfilechooser rely on giving file managers a path to a file and expecting the cursor to be on that file on startup.

Describe the solution you'd like
When spf is given a path to a file rather than a directory it should open to the parent directory of that file and put the cursor on the given file (if it exists of course).

Current Behavior:
> spf "/a/b/file.txt" -> Opens /a/b/file.txt as a directory, and shows "No such file or directory".

Expected Behavior:
> spf "/a/b/file.txt" -> Opens /a/b as a directory, with file.txt as the file where the cursor is pointing.

Describe alternatives you've considered
None

Additional context
Mentioned in #622, here.

Also briefly brought up in Rolv-Apneseth/tfm.nvim#18.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaany new ideas or suggestionspending releaseFix is merged, but not released to the newer version

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions