[Geany-Devel] pull request on GitHub, to add GeanyHighlightSelectedWords, into Geany Plugins

Matthew Brush mbrush at xxxxx
Thu May 28 23:25:53 UTC 2015


On 2015-05-28 02:03 PM, marius buzea wrote:
> Hello,
>
> I have read the source code of automark [ https://github.com/geany/geany-plugins/blob/master/automark/src/automark.c ].
> Functionally, automark and GeanyHighlightSelectedWord are alike, I think.    There are differences between automark
> and HighlighSelectedWord.
>
>
> Automark is concise: it uses the SCI_FINDTEXT messages to scintilla for finding occurrences of selected text.
> Automark uses a timeout callback for matching text.
>
> GeanyHighlightSelectedText is more 'low-level':  it does not use scintilla's SCI_FINDTEXT functionality, instead it
> uses the KMP algorithm to find all occurrences of selected text in visible text.      GeanyHighlightSelectedText does
> not use timeout callback for matching text.
>
> While the functionality may be the same, there were different decisions in the design of these two plugins.     Let's
> have both automark and GeanyHighlightSelectedText included in Geany Plugins.
>

Hi,

Ideally you could improve the underlying implementation of an existing 
one if your way is better[0] and they perform the same function. It's 
really confusing for users to figure out what is the "right" plugin when 
there's too many doing the same thing. The same thing happens with 
GeanyGDB, Debugger, and Scope right now.

That being said, showing occurrences of the word is such a common and 
fairly useful feature for an IDE, I'd personally rather see the 3-4 
existing plugins obsoleted by a good implementation in core Geany[1].

Cheers,
Matthew Brush

[0]: though if it's just for performance, I doubt it will matter at all 
for any of them except for massive data files or something.
[1]: since it's relative simple and such a common editor feature that we 
already do have, it just doesn't work quite like people want.



More information about the Devel mailing list