An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

## Auto Self Close Tag


Logo



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.