Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>html2pugNew to Visual Studio Code? Get it now.

html2pug

dbalas

|
13,603 installs
| (3) | Free
HTML to PUG VSCode extension
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-html2pug

Transform html to pug inside your Visual Studio Code, forget about using an external page anymore.

The MIT License GitHub Visual Studio Marketplace Visual Studio Marketplace

Features

  • Format selection.
  • Multiple selections support.
  • Keyboard shortcut: Ctrl + Alt + p / ⌘ Command + Alt + p

Installation

Install this extension from the VSCode Marketplace

Usage

  1. Select the html.
  2. Hit ⌘ Command + ⇧ Shift + p / Ctrl + ⇧ Shift + p
  3. Run html2pug: Transform or Ctrl + Alt + p / ⌘ Command + Alt + p .

Keyboard Shortcut

Use the following to embed a shortcut in keybindings.json. Replace with your preferred key bindings.

    {
      "key": "ctrl+alt+p",
      "command": "extension.transformHtmlToPug",
    }

You can customize your shortcuts too under: File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on macOS) Check key bindings docs.

Options

Settings object with defaults.

    {
      "html2pug": {
        "tabs": false, // !editor.options.insertSpaces
        "fragment": true,
        "doubleQuotes": false,
        "commas": false,
      }
    }

Built With

  • html2pug - html to pug engine

Contributing

Feel free to submit pull request or suggestions here.

Contributors

  • Daniel Balastegui - Initial work - dbalas
  • Lu Nelson - Contributor - lunelson

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

MIT license.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft