Home > OS >  IntelliJ add * on each comment line after pressing enter
IntelliJ add * on each comment line after pressing enter

Time:10-07

In IntelliJ, to create a comment-block I can do CmdOpt/, but it doesn't fill-down an * on all lines. Additionally, pressing enter goes to a new-line without copying down the *. Is there a way to auto-fill things, such that it looks more like this?

/*
 * Copyright (c) 2022 by Bob Jones
 *
 * The MIT license.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:

CodePudding user response:

Hit Alt Enter on the comment and select "Replace with JSDoc comment" intention from the list of actions. enter image description here

  • Related