Overview
The Comment extension provides keyboard shortcuts to comment out and uncomment selected lines with line comments and block comments.
Keys | Description |
---|---|
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 } );
or import the file:
<script src="path-to-the-file/comment.min.js"></script>
Options
Setting false
to comment
disables the extension.
new RyuseiCode( { comment: false } );
The Language object determines the syntax of a line comment and a block comment.