Overview

The Comment extension provides keyboard shortcuts to comment out and uncomment selected lines with line comments and block comments.

KeysDescription
Ctrl+/Comment out and uncomment lines with line comments
Ctrl+Shift+/Comment out and uncomment lines with block comments

Usage

Register the Comment component:

import { RyuseiCode, Comment } from '@ryusei/code';
RyuseiCode.compose( { Comment } );
JavaScript

or import the file:

<script src="path-to-the-file/comment.min.js"></script>
HTML

Options

Setting false to comment disables the extension.

new RyuseiCode( { comment: false } );
JavaScript
The Language object determines the syntax of a line comment and a block comment.