Prevent Comments Block Folding
Hi All,
I writing a post to ask if there is a way, or plugin which allow you to select which block you want to fold when you use shortcut.
I would like to prevent folding of comments blocks.
For me, if comments are folded, they are useless.
See below a demonstration of a software i use which allow it. I wand to leave this online software to go on phpStorm.
(I know my comments are not PSR-2, but i also want for PSR-2 Comments)
Thanks a lot.
Please sign in to leave a comment.
Hi there,
Unfortunately it's not that obvious (to me at very least) what exactly you wish to be done.
I mean:
Therefore:
Hi Andriy Bazanov,
Thank you for your reply. Your are awesone. I didn't thought to use macro feature to realize that.
See below what i get with macros. The result is the same as what i had in Codeanywhere Version 5 !
So i have all features which i looking for to change developping software in favor of local client.
(In codeanywhere, i use tabsize = 3, so the presentation is broken in demonstration)
Thanks again for your support.
Best Regards,
Nicolas DUPRE @Neoblaster.
Hello Andriy,
Could you please explain how I can fold only methods and not comments? Specifically, here's a screenshot. As you can see, one-line comments randomly appear for folding and unfolding. I don't want this. I want only method names or code blocks to be folded or unfolded. I have attached screenshot herewith.
@VB
All available options for auto code folding are located at "Settings/Preferences | Editor | General | Code Folding".
Sadly I cannot say why you have a folding block there for those 4 consequent commented lines (it does not seem to happen to me in PHP), but I personally would understand why it may happen (consequent comments mean unneeded code or actually related comments).
My best guess right now -- maybe you are adding such folding yourself? e.g. selecting that code and then hitting shortcut for "Code | Folding | Fold Selection" ?
In my case I wanted the code to not fold for every team member not just me (we all use PHPStorm), the workaround I found is to put the comments this way, which prevents it from being folded by default (or so it seems):
@Neo-blaster
How did you make the video gif?
That seems very useful here.