Espresso Navi
A nested element navigator for VS Code – like the Outline view, but built for template work:
click an element to select it as a whole, and fold / unfold it in the editor straight from the tree.
Works great with WordPress / PHP templates, where HTML tags and PHP functions are mixed in one file.

Features
- Select whole elements – one click selects the complete tag incl. content, the whole function or the whole CSS rule.
- Fold / unfold in the editor – inline buttons and context menu: fold, unfold, fold all children, unfold recursively.
- Drag & drop with drop indicator – reorder elements right in the navigator. A line shows where the element will land (before / after); hovering the middle of an element drops it inside. The source code is moved accordingly (indentation adjusted, one undo step).
- Multi-selection –
Cmd/Ctrl+Click and Shift+Click select several elements, which are selected in the editor at the same time (multi-cursor). Copy, cut, delete, fold and drag work on all of them.
- Context menu – select inner content (without start/end tag), copy, cut, delete.
- Colored icons per HTML tag group – containers, text, lists, tables, links/forms, media, meta.
- Follow cursor – the element under the cursor is highlighted in the tree.
- Expand selection by element – step from content → element → parent element.
Supported languages
| Language |
Source |
| PHP (e.g. WordPress templates) |
built-in parser: HTML tags and PHP classes / functions / closures mixed |
| HTML, CSS, SCSS, LESS, JS, TS, JSON … |
VS Code symbol provider (like the Outline), falls back to the built-in parser |
| XML, XSL, SVG |
symbol provider (e.g. Red Hat XML), otherwise built-in parser |
For PHP and XML files the extension also provides folding ranges, so HTML tags inside PHP templates become foldable.
Keyboard shortcuts
| Mac |
Windows / Linux |
Action |
↑ ↓ ← → |
↑ ↓ ← → |
Navigate / collapse / expand in the navigator (Shift extends the selection) |
Space |
Space |
Fold / unfold the element in the editor |
Cmd+Alt+A |
Ctrl+Alt+A |
Select the enclosing element at the cursor |
Cmd+Alt+↑ |
Ctrl+Alt+↑ |
Expand selection: content → element → parent |
Settings
| Setting |
Default |
Description |
espressoNavi.clickAction |
select |
select the whole element or just reveal it |
espressoNavi.focusEditorOnClick |
true |
Move focus to the editor after clicking |
espressoNavi.followCursor |
true |
Highlight the element under the cursor |
espressoNavi.expandDepth |
2 |
Initial expansion depth of the tree |
espressoNavi.parser |
auto |
auto | builtin | provider |
espressoNavi.colorIcons |
true |
Color HTML tag icons by group |
espressoNavi.provideFoldingRanges |
true |
Folding ranges for PHP / XML |
espressoNavi.showInExplorer |
false |
Also show the navigator in the Explorer sidebar |
Deutsch
Verschachtelte Code-Navigation, ähnlich der Gliederung, aber mit Auswahl ganzer Elemente per Klick und Auf-/Zuklappen im Editor direkt aus dem Baum. Ideal für WordPress-/PHP-Templates, in denen HTML und PHP gemischt sind.
- Klick auf ein Element → komplettes Element ausgewählt (Tag inkl. Inhalt, ganze Funktion, ganze CSS-Regel)
- Inline-Buttons / Kontextmenü: Zuklappen, Aufklappen, alle Kinder zuklappen, Inhalt auswählen, Kopieren, Ausschneiden, Löschen
- Drag & Drop mit Einfügelinie: Elemente per Ziehen neu anordnen. Eine Linie zeigt, wo das Element landet (davor/danach), über der Mitte eines Elements wird es hinein verschoben. Der Code wird mitverschoben (ein Undo-Schritt)
- Mehrfachauswahl:
Cmd/Ctrl+Klick und Shift+Klick wählen mehrere Elemente, die gleichzeitig im Editor markiert werden (Mehrfachcursor). Kopieren, Ausschneiden, Löschen, Falten und Ziehen wirken auf alle
- Farbige Icons je HTML-Tag-Gruppe
Cmd+Alt+A / Ctrl+Alt+A: Element am Cursor auswählen · Cmd+Alt+↑ / Ctrl+Alt+↑: Auswahl schrittweise erweitern
License
MIT
| |