Skip to content
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

How to hide file links in the directory tree? #1352

Open
jackywu opened this issue Mar 14, 2023 · 1 comment
Open

How to hide file links in the directory tree? #1352

jackywu opened this issue Mar 14, 2023 · 1 comment

Comments

@jackywu
Copy link

jackywu commented Mar 14, 2023

Before creating an issue, take some time to search these resources. It's possible that someone else has already asked your question and gotten an answer.

State Your Question

After searching through the documentation for nerdtree, I couldn't find a way to hide file links in the directory tree. What can I do?

Xnip2023-03-14_19-50-43

jackywu referenced this issue Apr 16, 2023
Previously we highlighted symlinks as one item (NERDTreeLink):

    symlinked_file -> /path/to/target

Split this out into 3 highlight groups:
    * NERDTreeLinkFile
    * NERDTreeLinkDir
    * NERDTreeLinkTarget

So we have:

    symlinked_dir/ -> /foo/bar
    -------------- ***********
         ^               ^
         |               |
    NERDTreeLinkDir   NERDTreeLinkTarget

Similarly for file links - with NERDTreeLinkFile instead of
NERDTreeLinkDir.

This allows users to modify how symlinks are highlighted. E.g. to make
them appear as normal files/dirs they could add this to their vimrc:

    hi link NERDTreeLinkFile NERDTreeFile
    hi link NERDTreeLinkDir NERDTreeDir
    hi link NERDTreeLinkTarget ignore
@jackywu
Copy link
Author

jackywu commented Apr 16, 2023

I find a workaround way , put it in .vimrc will make the symlink target do not capture you attention:

        " make symlink do not hightlight 
        hi link NERDTreeLinkTarget Conceal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant