I'm in search of a tool which will allow me to customize dynamic syntax highlight rules :
Examples of static syntax highlighting (most IDEs already do this).
Highlight all occurences of the word int
as red.
Highlight all strings (enclosed in "
) in blue.
Examples of DYNAMIC syntax highlighting
Given a string of txt that appears > twice, I want it highlighted purple.
If I click on a block of text, I would like all blocks of txt on the same file highlighted green.
I'm assuming that someone may have built such a highlighter before, but I can't find anything on the web. Any feedback on how:
I can extend an existing project (ideally, I'd like this to be an IDE plugin) to customize my dynamic requirements?
In case 1 is not in existence, any templating languages that might be maximally effective for this sort of project ? i.e. any frameworks that highlight text on the fly, dynamically, while enabling editing - that are easily extended.
Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.
Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms.
Go to the Prism project homepage (https://prismjs.com/), then to the download page as before, and generate a script file selecting only the coding languages you are interested in; don't reselect any plugins. Then download the JavaScript file. Remember: do not download the CSS file, only the prism. js file.
Syntax highlighting is a styling format commonly used to display code. It adds line numbers and colors to highlight code patterns which makes it easy to understand. Here is an example of a code snippet with some syntax highlighting. Notice the line numbers and colors used to highlight different elements in the code: 1.
Emacs (www.gnu.org/s/emacs/) should be able to do this.
Emacs is extremely customizable; you code (e)Lisp functions to make it do what you want. Many of Emacs's language-specific modes do "fixed" highlighting of keywords; you should be able to hijack that machinery and make the highlighting dynamic as interests you. Huge libraries of eLisp code for such modes is available from GNU.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With