https://github.com/ziishaned/auto-self-close-tag
Automatically adds closing tags for HTML elements and removes closing tags when converting to self-closing
https://github.com/ziishaned/auto-self-close-tag
html jsx php tsx vscode vscode-extension xml
Last synced: 2 months ago
JSON representation
Automatically adds closing tags for HTML elements and removes closing tags when converting to self-closing
- Host: GitHub
- URL: https://github.com/ziishaned/auto-self-close-tag
- Owner: ziishaned
- License: mit
- Created: 2025-03-22T18:14:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-22T22:50:40.000Z (over 1 year ago)
- Last Synced: 2025-03-22T23:26:39.658Z (over 1 year ago)
- Topics: html, jsx, php, tsx, vscode, vscode-extension, xml
- Language: TypeScript
- Homepage:
- Size: 8.13 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Auto Self Close Tag
A VSCode extension that simplifies working with HTML self-closing tags and removes closing tags when converting to self-closing.
### Demo
| Before | After |
| ---------------------------- | ---------------------------- |
|
|
|
|
|
|
### Features
This extension provides two key features to make working with self-closing HTML tags smoother:
1. Auto-Convert Regular Tags to Self-Closing Tags
When you add a slash to convert a regular HTML tag to a self-closing tag, the extension automatically removes the corresponding closing tag.
### Example:
```html
```
When you add a slash after the "p" to make it
closing tag:
```html
```
2. Auto-Complete Self-Closing Tag Syntax
When typing a self-closing tag, the extension automatically adds the closing angle bracket.
### Example:
```html
```
### Supported Languages
- HTML
- XML
- PHP
- JavaScript (JSX)
- TypeScript (TSX)
### Installation
1. Open VSCode
2. Go to Extensions (Ctrl+Shift+X)
3. Search for "Auto Self Close Tag"
4. Click Install
### Usage
The extension works automatically when editing supported file types. No configuration needed!
### Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
### License
This project is licensed under the MIT License - see the LICENSE file for details.