Opened 13 years ago
Last modified 5 years ago
#7308 new enhancement
Syntax highlighting in search dialog
Reported by: | joshdoe | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | search syntax highlighting gsoc-candidate | Cc: | joshdoe |
Description
This is somewhat related to #7230, but is worthy of a separate ticket in terms of scope and discussion.
As the number of Special targets (search operators) increases, the likelihood of someone inadvertently using one increases, especially for beginning users. I suggest that we somehow visually distinguish these keywords from normal keywords, perhaps by using a bold font or underlining. Later I'll attach an example screenshot.
Attachments (0)
Change History (4)
comment:1 by , 13 years ago
Keywords: | syntax highlighting added |
---|---|
Summary: | Visually distinguish search operator keywords from normal keywords → Syntax highlighting in search dialog |
comment:2 by , 6 years ago
Keywords: | gsoc-candidate added |
---|
comment:3 by , 5 years ago
I found a useful package https://github.com/codelibs/jhighlight. It can output highlighted text as XHTML and therefore could be placed in html editor panes, but I haven't read exact codes and am not sure if this will work.
comment:4 by , 5 years ago
As the SearchCompiler can parse the search data itself, using an external library to do a syntax highlighting seems wasted effort. The internal functions should be able enough to deliver the required information (and probably in much better quality, as it must be identical to the final results).
So if implemented it should rely on what we already have.
For reference, here are some Java syntax highlighting libraries:
I'm not necessarily advoctating we use these libraries (though autocomplete would be very cool), but perhaps they'll at least offer inspiration.