Skip to content

Higurashi-kagome/dir-tree

Repository files navigation

Dir Tree

A VS Code extension for generating directory tree.

Features

Use it by right clicking on a folder or entering Generate directory tree in the Command Palette.

And you can:

  • Exclude / Include folders or files by clicking the checkbox on the side of the panel.
  • Hide / Display icons of the tree by clicking the checkbox on the top of the tree text.
  • Choose different tree styles from the menu of options.

demo

Extension Settings

settings

  • Check the Add Icon option when you wanna add icons in the tree by default.

  • Check the Load Gitignore option when you wanna exclude files and folders by parsing .gitignore file.

  • Choose default tree style from the Tree Style menu.

  • Use .gitignore pattern to edit Ignore config when you wanna exlude files or folders globally:

    //settings.json
    "dirTree.ignore": [
        ".git/",
        "node_modules/",
        ".github/",
        "/.eslintrc.json",
        "/package-lock.json"
    ]

Known Issues

  • It's slow when generating the tree for a directory with a amount of files, you need to wait for a while in this case.
  • The .gitignore file in the subfolder will not be parsed. So you might find the patterns of the .gitignore file don't work if you used .gitignore in the subfolders.
  • When there is a folder ignored by .gitignore, it's possible to wrongly ignore all the files which is under the folder althought some files should not be ignored. For example, when folder test is ignored by .gitignore, the subfile test.md is possible to be ignored althought there is also a line !test.md in the .gitignore file.

Change Log

CHANGELOG.md

Similar projects

zhucyi/project-tree

XboxYan/tree-generator

openmynet/dir-tree-generator

d-koppenhagen/vscode-file-tree-to-text-generator

And there are some similar extensions which are not open-source nowadays:

file-tree-generator

Directory-tree generator

Note:Dir Tree is improved on the basis of file-tree-generator .

License

MIT