- June 9, 2011 at 4:08 pm #9412
I want Highlight word at cursor(caret) by press F6,
and Unhighlight word at caret by press F6 too.
(use F6 to toggle Highlight in xx.jsee documents)
below snippet macro can add keyword “return” to Highlight List :
var cfg = document.Config;
cfg.Highlight.List.Add(“return”, 1, 1, 0, 0, 0, 0, 0);
but it have no effect because keyword “return” in list already !!
My test result is that Highlight only effect at prior keyword rather posterior keyword
if the keyword duplicate.
So can you add below two feature ?
1. add a method like Highlight.List.AddAtBegin(),
for insure the new add keyword will overwite Highlight effect.
2. add a UserData(int) Propertie to HighlightItem Object for
macro or plugin use (can’t set value by Highlight dialog),
then macro/plugin can easy know whether Remove that keyword.
UserData of xx.jsee’ default keyword “return” is 0 ==> NOT Remove it
UserData of macro F6 added keyword “return” is 1 ==> can Remove it
Thanks !June 9, 2011 at 4:45 pm #9413
Instead of adding to or removing from the list, you might want to enable/disable the word. Setting the Color property to 0 should disable the corresponding word, and setting back to 1 or more should enable the highlight. http://www.emeditor.com/help/macro/highlight_item/color.htm
However, I might add a new feature to easily toggle highlighting words in future versions.
Thank you!June 10, 2011 at 4:39 am #9416
No, enable/disable the word is no help !
because I want highlight the word already highlighted sometimes.
sometimes I want to see where the macro document appear “return” word temporary.
So I want all “return” word have become Special-Highlight for easy read the source code,
but the word “return” has its highlight color already (so enable/disable the word is no help)
and should keep the syntax color setting in *.jess files.
sometimes I want highlight some variable (ex: “MyVari”) temporary.
What I want is look like the highlight result of find command,
but I need highlight more than one words synchronous, like example_1 + example_2.
(those two words have different colors and can toggle Special-Highlight conveniences and individually)
Can you add “Highlight(3)” or “Highlight(user)” tab when press Alt+Enter ?
I wish those highlight words (ex “return” and “MyVari”) NOT mix in syntax highlight setting.
Many program languages (ex *.cpp, *.jsee, …) have very long highlight list setting.
If mix user words and language words, it will be not conveniences and maybe kill language words mindless.
Maybe it is document.Config.Highlight.UserList, and color more priority than document.Config.Highlight.List !
(I have a picture show highlight-plugin of jEdit, its list NOT mix in language words list,
but I don’t know how to attach image file)
Thank you for add toggle feature in future versions !
:-)June 10, 2011 at 4:45 pm #9421
I will consider adding the ability to add a temporary highlight list.
You must be logged in to reply to this topic.