Home > other >  Multiple line to single line comment find & replace
Multiple line to single line comment find & replace

Time:08-15

what's the quickest way for me, in VSCode, to find and replace a comment structured like this:

/**
 * Comment here
 */

With:

// Comment here

Bearing in mind here the actual comment itself should persist, so just the comment syntax being changed.

I'm hoping there is an easy find & replace operation I haven't come across before that I can perform in the editor.

Thanks!

CodePudding user response:

Unless there is a vscode command to toggle a doc comment (which would make this much easier) you can do it with an extension that can run multiple finds and replaces and commands.

Using swap comments from jdoc to line comments demo

  • Related