Skip to content

dbalas/vscode-html2pug

Repository files navigation

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

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.

About

HTML to PUG VSCode extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6