BBCode Extension for Visual Studio Code
March 31, 2025 ยท View on GitHub
Overview
The BBCode extension for Visual Studio Code provides syntax highlighting, auto-closing brackets, and a variety of snippets to make writing BBCode easier and more efficient.
Features
Snippets
The extension includes a comprehensive set of snippets for common BBCode tags. Below is a list of available snippets:
-
BB URL
- Prefix:
url= - Body:
[url=${1:link}]${2:title}[/url]\$0 - Description: BB-Code URL
- Prefix:
-
BB List
- Prefix:
list - Body:
[list] [*]${1:first input} [*]${2:second input} [*]${3:third input} [/list]\$0 - Description: BB-Code List
- Prefix:
-
BB Spoiler
- Prefix:
spoiler - Body:
[spoiler]${1:text}[/spoiler]\$0 - Description: BB-Code Spoiler
- Prefix:
-
BB Quote
- Prefix:
quote - Body:
[quote]${1:text}[/quote]\$0 - Description: BB-Code Quote
- Prefix:
-
BB Code
- Prefix:
code - Body:
[code]${1:text}[/code]\$0 - Description: BB-Code Code
- Prefix:
-
BB Image
- Prefix:
img - Body:
[img]${1:link}[/img]\$0 - Description: BB-Code Image
- Prefix:
-
BB Bold
- Prefix:
b - Body:
[b]${1:title}[/b]\$0 - Description: BB-Code Bold
- Prefix:
-
BB Italic
- Prefix:
i - Body:
[i]${1:text}[/i]\$0 - Description: BB-Code Italic
- Prefix:
-
BB Underline
- Prefix:
u - Body:
[u]${1:text}[/u]\$0 - Description: BB-Code Underline
- Prefix:
-
BB Strike
- Prefix:
s - Body:
[s]${1:text}[/s]\$0 - Description: BB-Code Strike
- Prefix:
-
BB Size
- Prefix:
size - Body:
[size=${1:1}]${2:text}[/size]\$0 - Description: BB-Code Size
- Prefix:
-
BB Bold Size 4
- Prefix:
b4 - Body:
[size=4][b]${1:title}[/b][/size]\$0 - Description: BB-Code Bold Size 4
- Prefix:
-
BB Bold Size 3
- Prefix:
b3 - Body:
[size=3][b]${1:title}[/b][/size]\$0 - Description: BB-Code Bold Size 3
- Prefix:
-
BB Bold Size 2
- Prefix:
b2 - Body:
[size=2][b]${1:title}[/b][/size]\$0 - Description: BB-Code Bold Size 2
- Prefix:
-
BB Bold Size 1
- Prefix:
b1 - Body:
[size=1][b]${1:title}[/b][/size]\$0 - Description: BB-Code Bold Size 1
- Prefix:
-
BB Bold Italic
- Prefix:
bi - Body:
[b][i]${1:title}[/i][/b]\$0 - Description: BB-Code Bold Italic
- Prefix:
Auto-Closing Brackets
The extension provides auto-closing brackets for BBCode tags. When you type an opening tag, the corresponding closing tag is automatically inserted. This feature helps to ensure that your BBCode is properly formatted and reduces the chance of errors.
Syntax Highlighting
The extension includes syntax highlighting for BBCode. The following tags are highlighted:
- Bold:
[b]...[/b] - Italic:
[i]...[/i] - Underline:
[u]...[/u] - Strikethrough:
[s]...[/s] - URL:
[url=...]...[/url] - Spoiler:
[spoiler]...[/spoiler] - List:
[list]...[*]...[/list] - Quote:
[quote]...[/quote] - Code:
[code]...[/code] - Image:
[img]...[/img] - Size:
[size=...]...[/size]
The syntax highlighting makes it easier to read and edit BBCode by visually distinguishing different tags and their content.
Installation
To install the BBCode extension:
- Open Visual Studio Code.
- Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X. - Search for "BBCode".
- Click "Install" on the BBCode extension.
Usage
To use the BBCode snippets:
- Open a file with the
.bbcodeextension. - Start typing the prefix for the desired snippet (e.g.,
bfor bold). - Select the snippet from the suggestions list and press
Enter.
The snippet will be inserted into your document, and you can fill in the placeholder text.
Contributing
If you would like to contribute to the BBCode extension, please visit the GitHub repository and submit a pull request.
License
This extension is licensed under the MIT License.