Highlight Same Words on Double Click
Posted: Mon Mar 28, 2016 12:25 am
By default when you double click on a word in Zeus all it does is mark that word.
But it is possible to highlight other instances of the current word using the Edit, Highlight Current Word menu and naturally it is very easy to bind that menu action to any keyboard key combination.
But how can those two actions be tied together
Fortunately it is very easy to tie that menu action to the mouse double click action and all that is needed is a simple macro script and a minimal configuration change.
This is what needs to be done:
1. Use the Options, Document Types menu and pick a document type to be edited.
2. Lets assume the C/C++ Document Type was selected and the Edit button used to edit that document type.
3. In the Triggers panel add the text below to the Mouse Double Click section:
Now if you open up any C/C++ document the mouse double click action will highlight all instances of the word selected by the double click.
To make this behavior standard for all document types, make the changes described above, but instead of selecting the C/C++ Document Type, make the changes to the Default Document Type.
Cheers Jussi
But it is possible to highlight other instances of the current word using the Edit, Highlight Current Word menu and naturally it is very easy to bind that menu action to any keyboard key combination.
But how can those two actions be tied together

Fortunately it is very easy to tie that menu action to the mouse double click action and all that is needed is a simple macro script and a minimal configuration change.
This is what needs to be done:
1. Use the Options, Document Types menu and pick a document type to be edited.
2. Lets assume the C/C++ Document Type was selected and the Edit button used to edit that document type.
3. In the Triggers panel add the text below to the Mouse Double Click section:
Code: Select all
$zud\zScript\event_double_click_highlight.lua
To make this behavior standard for all document types, make the changes described above, but instead of selecting the C/C++ Document Type, make the changes to the Default Document Type.
Cheers Jussi