[Github-comments] [geany/geany] A problem with "go to matching brace" command. (#1998)

Yury notifications at xxxxx
Mon Apr 15 21:07:17 UTC 2019


Brace via bracket. Honestly, I don’t understand why linguistics has gain such an importance in this discussion. 
But, just out of my curiosity I did a quick search. Being sure that Geany inherited "braces" from Scintilla, I checked there:
_"Brace highlighting": ... The brace characters handled are '(', ')', '[', ']', '{', '}', '<', and '>'._ 
Well, maybe Neil Hodgson is stronger in C++ than in linguistics. Next, I checked with VIM:
_"Moving to matching braces" : "...To jump to a matching opening or closing parenthesis, square bracket or a curly brace: ([{}])"_
Finally, I looked at old emacs info:
_"The following commands move over groupings delimited by parentheses (or whatever else serves as delimiters in the language you are working with). "_
I was surprised: parentheses!! It turns out that emacs was not designed for C! Maybe for LISP?
However, it is enough with linguistics.  
(Just,
> And probably a note that it works on other bracket types but less perfectly

means that the logic is based on the brace shape and not on the brace order only, that is incorrect. I guess it was a problem with quick writing. )

> This may mean you need a more complex algorithm than that you proposed thats all, for example it may need to remember its original position.

I don't think that Geany needs to reinvent the wheel. I am a supporter of the strict logic based on the column position of the matching braces. The "goto" should not be ambiguous. Any sophisticated ambiguous placement will be good in simple cases, but in other cases it will cause an unexpected  placement if Geany does not prompt users to select the option they want. However, any prompt for the brace/bracket matching would be insane. 
I disagree with any sophistication.

A real highlighting instead of coloring would be really helpful anyway. 
But my motivation to use Geany for my daily routine is no longer so high. The reason I recently started using Geany as my main editor was very prosaic. Geany tracked the file's timestamp, when others just checked on focus switching and on file saving. I was interested in this. 
(You may remember my discussion about the infobar, unmodifiable buffer, and the missing RO indicator. By the way, the info infobar + a popup modal message will be enough. There is no need to switch to read-only mode while people type. Let users decide what they need.) 
When working with an atypical environment, when even C sources, called Pro*C, and Java sources contain embedded SQL, my first weapon is often “grep”. But Geany does not support the message window history. The history of the search results is necessary for my work, when additional monitoring of timestamps is desirable, but not necessary. Finally, I switched back to more typical editors. Unfortunately, it is very unlikely that I will find time for any pull request. 
I am not sure that I can provide more information. If someone will come back to this topic in the future, my second draft is pretty accurate. Just selecting between matches was not updated. 
I believe this issue could be closed, but, being not familiar with this project rules, I don't know what to do with the label "waiting for information".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1998#issuecomment-483419147
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190415/8c511acd/attachment.html>


More information about the Github-comments mailing list