2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

よくあるディレクトリ構造をマークダウンで書く方法

Last updated at Posted at 2024-08-12

技術ブログでよく見かけるこれ、マークダウンでどうやって書かれているのか気になったことはありませんか?という備忘録。

.
├── Package.swift
└── Sources
    └── main.swift

ディレクトリ構造をマークダウンで表現する際に使用する「├──」「└──」などの記号、直接キーボードで打つことはできない。正確には、エスケープシーケンスや、Altコードを使った直接入力の方法はある。ただ、Unicode(例えば、「├」 の Unicode である U+251C)を直接コードブロックに入力してもそのまま表示されるだけで、記号には変換されない。
よって、現実的な方法として、一瞬で書きたいなら既存のもの(上のやつ)をコピー&ペースト。カスタマイズしてより詳細を書き込みたいなら変換ツールの使用(↓)。手元のディレクトリを出力したいなら brew install tree して tree コマンドで出る。

2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?