Vim - kdaisho/Blog GitHub Wiki
- How to comment multi-lines
- Select lines
- Hit
:
then type this in Vim's command line
'<,'>s/^/\/\/
:[range]s/pattern/replacement/[flags]
s
means substitute (command for search and replace)
The result would be:
From
for (const f of firstPart) {
console.log(f)
}
To
// for (const f of firstPart) {
// console.log(f)
// }