Generates a clean comment box using ascii box drawing characters around a selection. Inspired by this prototype: https://prototypes.polymermallard.com/docblock/index.html
#
# ┌────────────────────────────────────────────────────────────────────────────┐
# │ │
# │ This is a comment of documentation (Doc Block) │
# │ │
# │ @param Request $request │
# │ @return Response │
# │ @throws \Exception │
# │ │
# └────────────────────────────────────────────────────────────────────────────┘
#
The plugin defaults to single line box drawing and 80 characters wide. You can change these in your settings:
"box-comment.chars": {
"tl": "╔",
"tm": "═",
"tr": "╗",
"l" : "║",
"r" : "║",
"bl": "╚",
"bm": "═",
"br": "╝",
"dl": "╠",
"dm": "═",
"dr": "╣"
},
"box-comment.length": 60
Three commands exist:
- Create comment box (via config)
- Create comment box (80 wide)
- Create comment box (120 wide)
The configuration setting is a numerical value for box-comment.length
.
For Mac/PC: shift cmd ;
/ shift alt ;
will run Create comment box (via config)
Dividers are supported by using two hyphens: --
Lorem ipsum dolor sit amet
--
Consectetur adipiscing elit
Becomes:
// ╔══════════════════════════════════════════════════════════╗
// ║ Lorem ipsum dolor sit amet ║
// ╠══════════════════════════════════════════════════════════╣
// ║ Consectetur adipiscing elit ║
// ╚══════════════════════════════════════════════════════════╝
- Ability to uncomment entire blocks back to normal
- Use block comments rather than line blocks
box-comment.indentation
setting for pre-indentationbox-comment.length
setting for total line lengthbox-comment.linebreak.before
boolean flagbox-comment.linebreak.after
boolean flag
- Added keybindings by default.
- Change various graphics and README data
- Initial publication
- Initial creation of Box Comment
We are using vsce
to package and publish. yarn vsce publish