Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Local Docker html2haml (Selection)New to Visual Studio Code? Get it now.
Local Docker html2haml (Selection)

Local Docker html2haml (Selection)

flave

|
1 install
| (0) | Free
Convert selected ERB/HTML to HAML via docker+html2haml and replace selection.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Local Docker html2haml – VS Code Extension 🧰

Minimal VS Code extension that converts selected ERB/HTML to HAML (and back) using Docker and replaces the selection in-place ✨

Prerequisites ✅

  • Docker Desktop is running 🐳
  • VS Code CLI code is available:
    • In VS Code: Command Palette → Shell Command: Install 'code' command in PATH
  • vsce is available (checked automatically during build).

Install / Build (recommended) 🚀

Copy/paste (clone, build, install) 📋:

git clone https://github.com/flavegmbh/local-docker-html2haml-vscode-extension.git
cd local-docker-html2haml-vscode-extension
make

Or if you already have the repo, run this in the project folder:

make

What make does 👇

  • sets the extension version in package.json to 0.0.<unixtime> (VS Marketplace compatible)
  • builds the Docker image: local/html2haml:latest
  • packages the extension as a .vsix via vsce package
  • installs the latest generated .vsix via code --install-extension ... --force

Then reload VS Code once 🔄

  • ⇧⌘P → Developer: Reload Window

Usage 🎯

  1. Select ERB/HTML or HAML in the editor.
  2. Open the Command Palette (⇧⌘P).
  3. Run one of:
    • Convert Selection from HTML -> HAML (Docker html2haml)
    • Convert Selection from HAML -> HTML (Docker html2haml)

Command IDs:

  • dockerHtml2haml.convertSelection
  • dockerHtml2haml.convertSelectionHamlToHtml

Build the Docker image manually (optional) 🧱

docker build -t local/html2haml:latest .

Docker smoke test (optional) 🧪

make test-docker

Troubleshooting 🛠️

  • “Docker not found”

    • Install/start Docker Desktop and make sure docker is on your PATH.
  • “Cannot connect to the Docker daemon” / permission errors

    • Start Docker Desktop, possibly log out/in.
  • html2haml: command not found

    • Rebuild image: docker build -t local/html2haml:latest .
    • Then run make and Reload Window.
  • Changes don’t take effect after make

    • VS Code caches extensions: ⇧⌘P → Developer: Reload Window
    • Alternatively: ⇧⌘P → Developer: Restart Extension Host
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft