Skip to content

open file with relative path when possible #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

smartding
Copy link
Contributor

nvim-tree currently opens file with its absolute path, so ctrl-g and echo expand('%') can return a really long path that's hard to read.

This PR make nvim-tree open/preview file with its relative path. It works for both files and links.
If the current file links to a another file which is outside current working directory, nvim-tree opens the file with its absolute path.

Should fix #482

Copy link
Member

@kyazdani42 kyazdani42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks :)

@kyazdani42 kyazdani42 merged commit db9e70f into nvim-tree:master Jul 6, 2021
kyazdani42 added a commit that referenced this pull request Jul 19, 2021
Almo7aya pushed a commit to Almo7aya/nvim-tree.lua that referenced this pull request Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

absolute path and relative path
2 participants