Closed pintassilgo closed 1 year ago
Confirmed, it is not working; will see it, thanks.
linux beta to test: cudatext.zip
For me, nothing has changed with this build, both examples from initial comment are still without folding button.
Did you set "auto_fold_comments" to value>1 ?
Right, thanks. It was 1, changed to 2 and now it almost works.
For comment block /* */
it's fine. But I think such block should be treated just like any code block like if () { }
i.e. it should be foldable by default, not needing to change the option. I guess this is how any code editor works.
I think of auto_fold_comments
as being for consecutive non-block comments, in case of JS are lines starting with //
. It's working, but the last consecutive comment line is missing from the folding.
Edit: I restarted Cuda and now the last consecutive comment line is correctly foldable. Weird, but the fact is now is working, so I guess I can close this. Thanks!
Just reinforcing my opinion that comment blocks like /* */
should be foldable by default just like any code block without needing to tweak options.
Right, thanks. It was 1, changed to 2 and now it almost works.
For comment block /* */
it's fine. But I think such block should be treated just like any code block like if () { }
i.e. it should be foldable by default, not needing to change the option. I guess this is how any code editor works.
I think of auto_fold_comments
as being for consecutive non-block comments, in case of JS are lines starting with //
. It's working, but the last consecutive comment line is missing from the folding.
lines starting with //. It's working, but the last consecutive comment line is missing from the folding.
It's minor bug , i could not solve it- add any ID after comment and it will be ok.
that comment blocks like / / should be foldable by default just like any code block without needing to tweak options.
Not agree
It's minor bug , i could not solve it- add any ID after comment and it will be ok.
Now I see, you're right. This bug only happens when consecutive comments are the last non empty lines of the file (line with just tab/space indentation still counts as empty).
I can understand the reasoning of not treating comment blocks as foldable by default because the user may be interested in fold the code but not comments, similar to header files, they're not interested in implementation but want to read the descriptions.
This reminds me of a new feature suggestion: command to fold all comment blocks/consecutive lines of the file at once, without touching any code blocks. Current folding commands don't differentiate between comment and code, like "fold level 1" will fold both code and comments (when auto_fold_comments > 1
).
This wish should be the request for small plugin cmd, e.g. for CudaExt ...
This wish should be the request for small plugin cmd, e.g. for CudaExt ...
Should I create this request somewhere?
Yes, in Cud main repo 'issues'
For example, this JavaScript content:
Should display a folding button to fold the entire comment block. At least for me it's not working.
Also, if I understood correctly, the option
auto_fold_comments = 1
should enable the folding button for consecutive comment lines likeBut it doesn't work for me either.