A VS Code extension for generating directory tree.
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.
-
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" ]
- 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 foldertest
is ignored by.gitignore
, the subfiletest.md
is possible to be ignored althought there is also a line!test.md
in the.gitignore
file.
d-koppenhagen/vscode-file-tree-to-text-generator
And there are some similar extensions which are not open-source nowadays:
Note:Dir Tree is improved on the basis of file-tree-generator .
MIT