Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown DirTree generatorNew to Visual Studio Code? Get it now.
Markdown DirTree generator

Markdown DirTree generator

Vandan Sojitra

|
23 installs
| (0) | Free
Beautiful directory trees for your README — with project-specific ignore support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Tree Generator

Generate directory trees for README files directly in Visual Studio Code.

Features

  • Interactive preview with collapsible folders and selection checkboxes.
  • Copy, save, or insert a fenced Markdown tree into an open Markdown document.
  • Visual ignore manager with searchable paths, exclusion reasons, and restore actions.
  • Project-specific .dirtreeignore patterns and optional root .gitignore support.
  • One Explorer submenu for every extension action.

Getting started

Right-click a folder and open Markdown Tree Generator:

Action Behavior
Interactive Tree Preview Choose files and folders, then copy, save, or insert Markdown.
Generate Markdown DirTree Open a plain directory tree in a new editor.
Copy Markdown DirTree Copy the plain directory tree.
Visual Ignore Manager Manage permanent exclusions for the workspace folder.
Create .dirtreeignore from Selection Exclude selected files or subfolders.

Commands are also available through the Command Palette, except the selection action.

Interactive preview

Folders start collapsed. Arrow buttons expand folders independently of their checkboxes. Selecting a folder selects its children; selecting a file includes its parent folders. Preview selections do not edit ignore rules.

Use Copy Markdown, Save…, or Insert into Markdown. To insert, open a Markdown document and position its cursor before opening the preview. If that document changes afterward, reopen the preview before inserting.

Manage exclusions opens the ignore manager. After editing rules, use Refresh files to reload the preview.

Ignore rules

The manager saves changes immediately to .dirtreeignore, preserving comments and existing line endings. Save any open, modified ignore file before applying changes.

# Ignore log files anywhere
*.log
# Ignore only the root temp folder
/temp/
# Include a file excluded by an earlier rule
!important.log

Rules use Git-style matching, including wildcards, anchored paths, and negation. Restore adds inclusion overrides; Remove rule deletes a custom rule. Default exclusions include .git, node_modules, dist, and build.

Enable Respect root .gitignore in the manager or the markdownTree.respectGitignore setting. Root Git rules apply before custom overrides. Nested Git ignore files are not loaded. Git files are never edited.

Example output

my-project/
├── src/
│   └── index.js
├── package.json
└── README.md

Supported environments and limits

Local filesystem folders are supported, including multiple workspace folders. Virtual and remote filesystem schemes are unsupported. Symbolic links are listed without following them.

Tree generation stops with an actionable error above 10,000 entries or 100 folder levels. The ignore manager lists up to 3,000 entries and does not scan excluded folders. Restore an excluded folder to inspect its children.

Development

See the development guide for the project layout, validation commands, debugging, and release checklist.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft