Menu

#535 matching braces for begin end

v1.0_(example)
open
nobody
None
5
2019-09-12
2019-01-10
No

Dear Sve developers,
I find very useful the feature of coloring the matching begin...end blocks in your SV editor.
That is, if the cursor is in a begin then the matching end for that block will blink. (The same for end ->begin)
I have seen that for large blocks it is very difficult to detect where the begin and the end is for an specific block. I have tried to split vertical/horizontal the editor view on eclipse and have two editor views of the same file. I realized that the matching begin...end feature is not working with different views/panes of the same file. I mean, i would like to select the begin on one pane of the file and see the blink on the other pane.
Would it be difficult to implement that?
Best regards,
Jonathan

Discussion

  • StevenAZ

    StevenAZ - 2019-01-10

    This reply doesn't address your bug... but I am documenting 2 other mechanisms that can be used when working with larger code blocks in case someone else reads your bug request in the future. These options select all the code between the begin / end which is useful for visualizing the span of a block of code.

    Option 1:
    Select any letter of a begin / end or a brace, then use the "Goto Matching Brace" command (Ctrl+Shift+P)

    Option 2:
    Use the "Select Enclosing Element" command - Shift+Alt+Up

     
  • Jonathan Alvarez

    Thanks!, both shortcuts are very useful for large blocks. The problem is that i tend to forget those nice shortcuts.

    Anyway, it would be also nice to highlight begin/end in both editor panes. I think supporting that way is also intuitive and it does not require to do anything / remember the shortcut.

     
  • Matthew Ballance

    Hi Jonathan,
    Unfortunately, Eclipse doesn't make it easy (possible?) to coordinate activity like this across multiple editor instances. Especially when it comes to cursor location, which what drives the brace-highlighting code, each editor maintains its own notion. Sorry to not have better news...

    Best Regards,
    Matthew
    
     
  • Jonathan Alvarez

    I think it is OK to close this as it will be difficult to implement it and there is already a nice way to solve it using the shortcuts of StevenAZ. Thanks

     

Log in to post a comment.