0

I have a problem with my JetBrains product which is not correctly comment block of code with Ctrl + Shift + /.

When I use this to comment my code it will add /* and */ in first column instead of my code indent so then after using reformatting my code these /* and */ will came to indent place of my code and my code which is commented now will more indent.

Sorry for my bad Description. I will show you an example.

        code
        to
        be
        comment

after commenting

/*
        code
        to
        be
        comment
*/

after refactor code

        /*
                    code
                    to
                    be
                    comment
        */
LazyOne
  • 158,824
  • 45
  • 388
  • 391
mh-alahdadian
  • 353
  • 5
  • 21
  • 1
    What language is that? AFAIK such option has to be implemented on per language basis. PHP and JavaScript have that for sure. One note though: that option is for line comments, not block comment. Block comments (which is what you have here in your question) will start when selection begins and when code/selection ends. – LazyOne Dec 06 '18 at 18:22
  • this is in javascript lang. and I will select these lines from beginning to end – mh-alahdadian Dec 07 '18 at 12:03
  • So .. what you may do right now: select line not from very end, but from actual first letter in that line. Try how it will work that way. From what I know, there is no such option for block comments, only for line ones The option for line comments: `Settings/Preferences | Editor | Code Style | JavaScript | Code Generation | Line comment at first column` – LazyOne Dec 07 '18 at 14:29

0 Answers0