Opened 8 years ago
Last modified 3 years ago
#4322 accepted enhancement
OMEdit: Improve commenting of folded lines - but how?
Reported by: | Jan Kokert | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OMEdit | Version: | |
Keywords: | commenting folded lines | Cc: |
Description
Commenting out folded lines in a hurry will result in syntax errors, as only the first line is commented out. It would be convenient if all lines are commented automatically.
One possibility is to add a //
at the beginning of every other line. Another possibility is to replace the just typed //
into a /*
and to add a */
at the end of the folded part.
Removing the comments should follow the same automatic behavior.
What do you think? Or is it only me, who noticed that? - This is a discussion ticket!
Change History (12)
comment:1 by , 8 years ago
Milestone: | Future → 1.12.0 |
---|---|
Status: | new → accepted |
comment:2 by , 8 years ago
I just added support for automatically unfolding the commented out block d79a354/OMEdit.
Note that if folding is in between comment then it doesn't matter.
comment:3 by , 8 years ago
Automatically unfolding the line is a simple and elegant solution. This will do the job as it will make the wrong syntax more obvious to the user now. You can close the ticket if you like.
comment:4 by , 8 years ago
I've just checked the new behavior in the latest nightly build. In my case, it will NOT automatically open the folding when I type //
. I use the standard two-line style which is given by OMEdit (e.g. if you place a resitstor in the Diagram View). In this OMEdit style, the line ends with annotation(
and the next line is indented with two spaces.
BTW: I really prefer exactly this two-line annotation style to the style which is used in the MSL and which is very inconsistent...
comment:5 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
comment:7 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:9 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
comment:10 by , 4 years ago
@adeas31: You thought you fixed this ticket with 'd79a354/OMEdit'.
The idea to simply unfold the lines is great!
But as I pointed out (4 years ago), OMEdit will not do that when typing: //
(tested with the latest version).
Can you please check, what is going on? Thanks!
comment:11 by , 4 years ago
Type: | discussion → enhancement |
---|
I think there is no easy solution to it.
I suggest that we should unfold the block and let user decide what to comment/uncomment.
I tried some other editors like
Qt Creator
,Notepad++
andVisual Studio
.Qt Creator
andNotepad++
does exactly the way we are doing right now. However,Visual Studio
unfolds the following section if the line which starts the fold is commented out.