Reputation: 10230
Hi guys suppose i want to comment the below code in vscode
files_converted.forEach( ( item , idx ) => {
zip_Directory( `${req.body.outputPath}/${item}` , `${req.body.outputPath}/${item}.zip` );
})
.then( () => {
console.log('FILES CONVERTED AND ZIPPED !')
}).catch( (err) =>
{ console.error(err)
});
Is there anyway of quickly selecting and commenting out the above code without using the mouse ? The comment style i prefer is ( /* some comment here */
).
Upvotes: 0
Views: 1147
Reputation: 575
for bracket selection, use this...
https://marketplace.visualstudio.com/items?itemName=dbankier.vscode-quick-select
for block comment, use Shift+Alt+A
Upvotes: 0
Reputation: 3541
To select something inside curly brackets, you can use smart select. The idea is that you can select the text inside curly brackets and "expand" the selection or "shrink" it. The default keyboard shortcut on Mac is Ctrl+Shift+Cmd+Right Arrow to grow and the left arrow to shrink.
To use block comments instead of line comments you can use ... well, the "block comment" function :-P Which by default is Command+Option+/ on Mac.
Upvotes: 3