Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Comment BannersNew to Visual Studio Code? Get it now.
Comment Banners

Comment Banners

Axel Delaval

|
120 installs
| (0) | Free
Insert stylish ASCII banners for code comments
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Comment Banners

GitHub License VS Code Marketplace

A VS Code extension to quickly insert stylish ASCII or markdown-style comment banners for code and documentation. Perfect for organizing large files and creating clear section headings.


Features

  • Centered Banners: Automatically centers your text using box-drawing characters.
  • Language Aware: Detects the file language to use the correct comment prefix (//, #, --, %, etc.).
  • Smart Wrapping: Automatically wraps text to multiple lines if it exceeds the set width.
  • Extensive Support: Now supports Lean, Rust, Haskell, SQL, and many more.
  • Customizable: Change the banner width or add custom prefixes in the settings.
  • Quick Shortcut: Use Ctrl + Alt + B (Windows/Linux) or Ctrl + Option + B (macOS).

Banner Styles

Supports multiple styles including: Double-line, Rounded, Thick, Single-line, Dashed, Classic, Equals, Arrow, Unicode Block, and Fidget.


Supported Languages

Automatically detects comment syntax for:

  • C-Style: JS/TS, Rust, C/C++, Java, Go, Swift, C#, etc. (//)
  • Hash-Style: Python, Ruby, Shell, YAML, Dockerfile, etc. (#)
  • Dash-Style: Lean, Haskell, SQL, Lua, Ada, etc. (--)
  • Percent-Style: LaTeX, Erlang, Matlab (%)
  • Others: Lisp (;;), Fortran (!), Assembly (;)

Usage

  1. Select text or place the cursor where you want the banner.
  2. Open the Command Palette (Ctrl+Shift+P).
  3. Type: Banner: Insert ASCII Box.
  4. Choose your preferred style.
  5. Done!

Extension Settings

This extension contributes the following settings:

  • commentBanners.width: Set the total width of the banner (default is 60).
  • commentBanners.customPrefixes: Define custom comment characters for specific language IDs.

Installation

Search for Comment Banners in the Extensions Marketplace or install via CLI:

code --install-extension naela.comment-banners
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft