Dynamic syntax highlighting

I am looking for a tool that will allow me to configure dynamic syntax highlighting rules:

Static syntax highlighting examples (most IDEs already do this).

  • Highlight all occurrences of the word int red.

  • Highlight all lines (enclosed in " ) in blue.

DYNAMIC syntax highlighting examples

  • Given the txt line that appears> twice, I want it to be highlighted in purple.

  • If I click on a block of text, I would like all the txt blocks in one file to be highlighted in green.

I suppose that before someone could create such a marker, but I cannot find anything on the Internet. Any feedback on how:

  • Can I extend an existing project (ideally, I would like it to be an IDE plugin) to customize my dynamic requirements?

  • In case 1 does not exist, any template languages ​​that can be most effective for this kind of project? that is, any frames that highlight text β€œon the fly” dynamically, while allowing you to edit that are easily expandable.

+8
eclipse dynamic ide syntax-highlighting netbeans
source share
4 answers

Emacs (www.gnu.org/s/emacs/) should be able to do this.

Emacs is extremely customizable; you enter (e) Lisp code to make it do what you want. Many Emacs-specific modes β€œlock in” the selection of keywords; You must hijack this technique and make the backlight dynamics as you are interested. Huge eLisp code libraries for these modes are available in GNU.

+4
source share

Eclipse does what may be exactly what you want, or at least very close.

Enable "tag entries" in "Settings"> "Java"> "Editor"> "Mark event locations"

As soon as you click on something like a local variable, you mark all occurrences of this variable in the current source file.

This can be very useful when combined with annotations. Disable Include In Next / Previous Navigation for all annotations except for occurrences. The easiest way is up / down arrows in the user interface. You click the small black down arrow immediately next to the large yellow up or down arrow on the toolbar. Now you can use the comma and period to move through all the events that you highlighted.

+3
source share

The Netbeans extraction tool is also quite complete and customizable.

Select all occurrences of the word "int" as red.

  • Netbeans does not have a default element for this keyword, the primitive is in the goup Keyword .

Highlight all lines (enclosed in "s") in blue.

  • Yes it is possible; Category: String

Given the txt line that appears> twice, I want it to be highlighted in purple.

  • Perhaps I do not understand this point very well, because if you select all the words written more than once, I am afraid that all your code will be purple after a certain line of code!

If I click on a block of text, I would like all the txt blocks in one file to be highlighted in green.

  • When you double-click on a word, all entries will be highlighted and a label will be displayed in the right column in each row containing the keyword. You can click on the label to quickly jump to the line containing this event.
  • You can also use the shortcut Ctrl + F3 to find the selection and select all occurrences (this may be all you want, not just keywords). And then use Shift + F3 to find the previous occurrence, and F3 to find the next

Can I extend an existing project (ideally, I would like it to be an IDE plugin) to customize my dynamic requirements?

  • I never tried to expand the selected categories, it seems that this is possible, but with a lot of work! See the link and one .
+3
source share

I'm not sure that you are using a full-fledged IDE, but Sublime Text 2 has a really nice auto-highlight: http://www.sublimetext.com/2

+3
source share

All Articles