Author Topic: SymHighlights GUI  (Read 35060 times)

stsimmer

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: SymHighlights GUI
« Reply #15 on: November 01, 2017, 10:35:10 AM »
Thank you very much, what about installation instruction?

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: SymHighlights GUI
« Reply #16 on: November 01, 2017, 07:45:09 PM »
In the readme.txt
The readme tells you to put these macro files in your CONFIG directory.
The CONFIG dir is something like C:\Users\joe\Documents\Slickedit\22.0.0.0\

I like to put my macros in a different location.
In CONFIG\user.cfg.xml I have added:
Code: [Select]
<misc.environment n="misc.environment" version="1" configs="win">
<p n="VSLICKMACROS" v="%VSLICKMACROS%;%SLICKEDITCONFIG%macros;%VSLICKPATH%;%SLICKEDITCONFIG%macros\Highlight"/>
<p n="VSLICKPATH" v="%VSLICKPATH%;%SLICKEDITCONFIG%macros;%SLICKEDITCONFIG%macros\Highlight"/>
</misc.environment>

This lets me put my macros into these two folders as well:
Code: [Select]
C:\Users\joe\Documents\Slickedit\macros
C:\Users\joe\Documents\Slickedit\macros\Highlight


There doesn't seem to be a UI in Slickedit to create this entry in user.cfg.xml, but it does preserve once it is there. (Restart slick after adding it).

Anyways, once you unpack the macros into CONFIG or Highlight as above, from the slick command line just run
Code: [Select]
symtagload

To be extra clear, when you have done it properly you will have either

Code: [Select]
C:\Users\joe\Documents\Slickedit\22.0.0.0\symtagload.e
or
Code: [Select]
C:\Users\joe\Documents\Slickedit\macros\Highlight\symtagload.e

stsimmer

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: SymHighlights GUI
« Reply #17 on: November 02, 2017, 05:56:07 AM »
I am sorry about incorrect question…  I need "how to..." for linux and VS22…
Currently i put a files to the /opt/slickedit-pro2017/macros/HighlightsDlg/ … (default installation directory for slick edit 22)
(HighlightsDlg created by me, and all files from zip under this directory...)
After this, I am trying to load  macro from: Macro->load module..
and nothing...

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: SymHighlights GUI
« Reply #18 on: November 02, 2017, 03:40:46 PM »
Your config directory would be something like ~/.slickedit/22.0.0
User your user account, not the slickedit installation folder.

You should see a file named user.cfg.xml in the same directory.

at5dapa1

  • Senior Community Member
  • Posts: 282
  • Hero Points: 24
Re: SymHighlights GUI
« Reply #19 on: February 16, 2018, 10:28:29 AM »
In CONFIG\user.cfg.xml I have added:
Code: [Select]
<misc.environment n="misc.environment" version="1" configs="win">
<p n="VSLICKMACROS" v="%VSLICKMACROS%;%SLICKEDITCONFIG%macros;%VSLICKPATH%;%SLICKEDITCONFIG%macros\Highlight"/>
<p n="VSLICKPATH" v="%VSLICKPATH%;%SLICKEDITCONFIG%macros;%SLICKEDITCONFIG%macros\Highlight"/>
</misc.environment>

Seems now (at least in Windows) we have to use SLICKEDITCONFIGVERSION instead of SLICKEDITCONFIG, so I have something like this:
Code: [Select]
<misc.environment n="misc.environment" version="1" configs="win">
<p n="VSLICK_MY_MACROS" v="%SLICKEDITCONFIGVERSION%_additional_macros_\;%SLICKEDITCONFIGVERSION%_additional_macros_\my_macros\;%SLICKEDITCONFIGVERSION%_additional_macros_\Symhighlight_V2\"/>
<p n="VSLICKMACROS" v="%VSLICKMACROS%;%VSLICK_MY_MACROS%"/>
<p n="VSLICKPATH" v="%VSLICKPATH%;%VSLICK_MY_MACROS%"/>
<p n="VSLICKINCLUDE" v="%VSLICKINCLUDE%;%VSLICK_MY_MACROS%"/>
</misc.environment>

echo %SLICKEDITCONFIGVERSION%
  =>  <My_Strange_Path>\config\22.0.2\
echo %SLICKEDITCONFIG%
  =>  <My_Strange_Path>\config\

at5dapa1

  • Senior Community Member
  • Posts: 282
  • Hero Points: 24
Re: SymHighlights GUI
« Reply #20 on: February 16, 2018, 10:45:53 AM »
Not sure if it's on my config only, but in SymHighlightV2/HighlightDialog.e, in findItem(), had to replace s_list_ctrl._TreeGetNextIndex(0) with s_list_ctrl._TreeGetNextIndex(TREE_ROOT_INDEX), else I was getting "This property or method is not allowed on this object" on new SE22.0.2/Win7x64.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: SymHighlights GUI
« Reply #21 on: February 16, 2018, 03:35:02 PM »
wrt SLICKEDITCONFIGVERSION:

Oops -- slickeditconfig is a system env var I set to tell Slick where to put the user configuration, instead of the default C:\users\<user>\documents\my slickedit config.

So you are right SLICKEDITCONFIGVERSION is the variable to use.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: SymHighlights GUI
« Reply #22 on: February 16, 2018, 03:37:03 PM »
wrt TREE_ROOT_INDEX: That is defined as 0 in C:\Program Files\SlickEdit Pro 22.0.2\macros\slick.sh.

If you change it back to 0 does the problem still repro for you?

Can you share repro steps?

at5dapa1

  • Senior Community Member
  • Posts: 282
  • Hero Points: 24
Re: SymHighlights GUI
« Reply #23 on: February 17, 2018, 11:45:21 AM »
Indeed I saw too that TREE_ROOT_INDEX is 0 and was a bit puzled why was complaining there and why TREE_ROOT_INDEX helped as it did work fine in 22.0.1. It appered sudenly in 22.0.2, maybe the macro reloading did help...
But now I put back to 0 and no more error! So maybe was something else, please ignore my comment for now. I'll come back if I hit again the issue.

rgloden

  • Senior Community Member
  • Posts: 169
  • Hero Points: 5
Re: SymHighlights GUI
« Reply #24 on: January 20, 2019, 09:34:50 PM »
I would be elated to see SymHighlights (or equivalent) incorporated into the official SE release.  Loading 3rd party macros on lots of desktops in an enterprise environment doesn't work well.

stsimmer

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: SymHighlights GUI
« Reply #25 on: March 08, 2020, 01:20:47 PM »
is it available in official release?

stsimmer

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: SymHighlights GUI
« Reply #26 on: March 10, 2020, 11:59:20 AM »
Trying to install it on my SlickEdit Pro 2019 (v24.0.1.0 64-bit) Linux, but nothing don’t work,
My installations steps:
1.Downloaded SymHighlightV2 from github: https://github.com/jporkka/slickMacros
2.Copyed all files from SymHighlightV2/*   to /home/<my_user_name>/.slickedit/24.0.1/…
   near file user.cfg.xml ...
4.Edited file user.cfg.xml add next:
Quote
<misc.environment n ="misc.environment" version="1" configs="win">
    <p n="VSLICKMACROS"   v="%VSLICKMACROS%;%SLICKEDITCONFIG%macros;%VSLICKPATH%;%SLICKEDITCONFIG%macros\Highlight"/>
    <p n="VSLICKPATH" v="%VSLICKPATH%;%SLICKEDITCONFIG%macros;%SLICKEDITCONFIG%macros\Highlight"/>
</misc.environment>

Nothing not happened… Something wrong with installation?
Any manual, how to… wiki...?    ???  ???  ???   :'(  :'(  :'(




Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: SymHighlights GUI
« Reply #27 on: June 18, 2021, 09:25:56 PM »
I am attaching a screen shot of the prototype of the Highlight tool window SlickEdit plans on adding for the next release.

Some quick explanations:

1) Profile:  Sets of words/expressions to highlight can be stored in the user configuration (user.cfg.xml), you can switch between them here, there will also be a handful of simple highlight profiles bundled, like Errors and Reminders, etc.

2) Adding words:  It will highlight words, substrings, or regular expressions, you can just type in a list of words here and they are added to the list, hit ENTER and they are committed to the list.  A double-quoted string is interpreted as a substring, an expression in slashes is interpreted as a regular expression, anything else is a word so long as it only contains word characters.  Strings can use \ escape sequences to embed a double quote or a tab character.   Regular expressions can use \/ to embed a slash.

3) The word column of the tree control will be an editable text box if you need to make corrections.

4) The Kind and Case columns will be combo boxes so you can change options.

5) The options area can be collapsed like other Tool window options areas.

6) You can select one of six highlighting styles, the default is Reverse colors, but you can also do Bold, Underline, Strikeout, Plain, and "Highlight" which just uses the background color defined for the "Highlight" color.

7) The colors used are part of the color profile, there is a new palette of 64 colors, so this "just works" with different color profiles.

8 ) You can also select to have it draw a box around the text (like SymHighlights does by default).

9) It can also create markers in the scrollbar markup area for the matches.

10) The coloring algorithm works a lot like symbol coloring, doing the current visible page, and then incrementally painting the rest of the document, this way it can scale to handle very large documents.  It will be configurable, like Symbol Coloring, to do only the current file, all visible files, or all open files.


This is a prototype.  I have a lot of work to do to clean this up the rest of the way and make it production ready.  I plan to implement most of the same (or directly compatible) commands like SymHighlights has for adding the word under the cursor, clearing highlights, toggling case sensitivity, toggling enable/disable for a words, cycling colors, etc.

I would have just sent this as a PM to JP and marksun, to continue our dialog, but the private messages do not let me attach an image.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: SymHighlights GUI
« Reply #28 on: June 18, 2021, 10:06:07 PM »
Looks great - Can't wait to try it out.

Profile: If possible, make this per-workspace

Errors: Do you mean it will use the error reg-exs to add highlights? Thats great. Also a good argument for this to be per-file. (Error highlighting on the build window/buffer).
Different highlighting on a per-regex capture group basis?

IgnoreCase: I've been doing a lot of Powershell lately. It is very case-insensitive - even identifiers. It would be nice for highlighting to understand this.

Editing: Even though symHighlights allows this, I don't think I've ever used it! (I rarely use the dialog) - 99% of the time I just toggle highlights on a given word, and clear all highlights. Maybe I would use it if it supported regex.

I really like the "Add words" edit box - this is probably a lot more useful that the list.
What happens when you hit ENTER: Does it replace the list, update it? Are duplicates filtered out?


Color Palette: Fantastic.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: SymHighlights GUI
« Reply #29 on: June 18, 2021, 10:36:30 PM »
Per-workspace is possible, since your current profile is part of your history (which can be per-workspace).

The "Errors" profile is very primitive for now, just the words "ERROR", "WARNING", and "FAILURE" (case-insensitive).
Nothing is per-file at the moment, but maybe for the next release.

There are three case options, Ignore Case, Match Case, and Per Language, which will use the language-specific case-sensitivity.
You can tack 'I' or 'E' after a slash or quoted string to force case-sensitivity. Example:  /Case/e

Enter commits items to the list.  Example.

1) add words(): [ the quick brown fox ] <ENTER>

2) after this the "add words(s)" box is emptied, and "the" "quick" "brown" and "fox" are added to the list.

3) add words(): [ jumped over the hazy fog ]

4) The words are immediately shown in the list but not committed,
    so when you backspace and change "hazy fog" to "lazy dog", then the list will update.

5) duplicates are tossed out.