Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>GLua Block CommentNew to Visual Studio Code? Get it now.
GLua Block Comment

GLua Block Comment

Sincopa

|
1 install
| (0) | Free
Toggle block comments (--[[ ... --]]) for Lua/GLua files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GLua Block Comment

VS Code extension for toggling block comments in Lua and GLua (Garry's Mod) files.

Features

  • Toggle block comments with a single keyboard shortcut
  • Uses Lua multi-line comment syntax: --[[ ... --]]
  • Works with Lua and GLua files (sv_, cl_, sh_*)
  • Smart detection: automatically comments or uncomments selected code

Usage

  1. Select one or more lines of Lua code
  2. Press Ctrl+Shift+/
  3. Selected code will be wrapped in block comment:

Before:

print(1)
print(2)
print(3)

After:

--[[
print(1)
print(2)
print(3)
--]]

Press Ctrl+Shift+/ again to remove the block comment.

Keybinding

Command Shortcut
Toggle Block Comment Ctrl+Shift+/

Requirements

  • Works only with .lua files
  • Requires text selection (does nothing without selection)

GLua Compatibility

This extension is designed for Garry's Mod Lua development:

  • Compatible with GLua syntax
  • No Lua 5.4 specific features
  • Works with all GMod file conventions (sv_, cl_, sh_)

Commands

  • lua.toggleBlockComment - Toggle Lua Block Comment

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft