Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimensi/vscode-xhtml2pug
https://github.com/dimensi/vscode-xhtml2pug
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dimensi/vscode-xhtml2pug
- Owner: dimensi
- License: mit
- Created: 2022-01-02T17:16:22.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-19T19:16:19.000Z (over 2 years ago)
- Last Synced: 2024-10-24T09:25:31.355Z (2 months ago)
- Language: TypeScript
- Size: 6.66 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-xhtml2pug README
Transform html to pug inside your Visual Studio Code, forget about using an external page anymore.
Powered by [xhtml2pug](https://github.com/dimensi/xhtml2pug)## Features
- Format selection.
- Multiple selections support.
- Keyboard shortcut: Ctrl + Alt + p / ⌘ Command + Alt + p## Installation
Install this extension from the [VSCode
Marketplace](https://marketplace.visualstudio.com/items?itemName=dimensi.vscode-xhtml2pug)## Usage
1. Select the html.
- Hit ⌘ Command + ⇧ Shift + p / Ctrl + ⇧ Shift + p
- Run `xHTML2Pug: Convert Vue to Pug` or Ctrl + Alt + p / ⌘ Command + Alt + p.
- Run `xHTML2Pug: Convert HTML to Pug`.## Keyboard Shortcut
Use the following to embed a shortcut in keybindings.json. Replace with your preferred key bindings.
```json
{
"key": "ctrl+alt+p",
"command": "vscode-xhtml2pug.transformVue2Pug"
}
```You can customize your shortcuts too under: File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on macOS)
Check [key bindings docs](https://code.visualstudio.com/docs/getstarted/keybindings).## Extension Settings
This extension contributes the following settings:
- `xhtml2pug.indent` (default: 'spaces'): Indent
- `xhtml2pug.numberOfSpaces` (default: 2): Number of spaces for indents
- `xhtml2pug.fragment` (default: true): Don't wrap into html > body
- `xhtml2pug.commas` (default: false): Commas in attributes
- `xhtml2pug.encode` (default: true): Encode html characters.
- `xhtml2pug.doubleQuotes` (default: false): Use double quotes for attributes
- `xhtml2pug.inlineCSS` (default: false): Place all classes in class attribute
- `xhtml2pug.classesAtEnd` (default: false): Place all classes after attributes