Author Topic: github repo  (Read 2460 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1901
  • Hero Points: 184
  • Text
github repo
« on: March 06, 2017, 06:48:20 pm »
I created github repo with some of my macros (including symhighlight).
You are also invited to add your macros there.

It should be more manageable then uploading ZIP archives here.
https://github.com/jporkka/slickMacros.git

Graeme

  • Senior Community Member
  • Posts: 2432
  • Hero Points: 322
Re: github repo
« Reply #1 on: March 08, 2017, 12:22:13 pm »
I think this is a good idea.  I've also been concerned that useful macros are hard to find here.

Graeme

  • Senior Community Member
  • Posts: 2432
  • Hero Points: 322
Re: github repo
« Reply #2 on: December 31, 2019, 05:22:53 am »
Is the offer still open to use this repo for slick macros?  I'd like to put xretrace etc. here in a few days.  It would be good to have one single place where people can go to get slick user macro code.
How can we handle having different macro code for different versions of slickedit?  Can it all be done at compile time?  Do we need to use some "standardised" tags?

Can we use the wiki to keep a list of all the macros here and what they do and their status - plus writing tips on how to write slick macros?  I'm currently unable to access the wiki.

Cloning the repo is a good way for people to download the macros and get updates but where does the cloned repo go?  If it's a sub-folder of a configuration folder it gets copied every time you upgrade - does that matter?  We should try to make it as easy as possible for people to use and load the macros.  Does slickedit git support have everything needed to manage the repo - it doesn't seem to have git clone.  We should support zip download too for people who don't want to use git.

Some comments from rowbearto here
https://community.slickedit.com/index.php/topic,16598.msg67548.html#msg67548


Dennis kindly wrote me some code a while ago that allows xretrace to be installed like a slickedit hotfix.


[quote from Dennis]
Something for you to give a test drive here.  Add these two files to your zip file, then people can install your macros as a SlickEdit hot fix.[/quote]
================
xmake_config_dirs.e
================
Code: [Select]
#pragma option(pedantic,on)
#include "slick.sh"
#import "main.e"
#import "stdprocs.e"

defmain()
{
   configDir := _ConfigPath();
   _maybe_append_filesep(configDir);
   xretraceDir := configDir :+ "xretrace";
   if (!isdirectory(xretraceDir)) {
      mkdir(xretraceDir);
   }
   _maybe_append_filesep(xretraceDir);
   bitmapsDir := xretraceDir :+ "bitmaps";
   if (!isdirectory(bitmapsDir)) {
      mkdir(bitmapsDir);
   }
}

========
hotfix.xml
========

Code: [Select]
<!DOCTYPE HotFix SYSTEM "http://www.slickedit.com/dtd/vse/upcheck/1.0/hotfix.dtd">
<HotFix Date="12/17/2018" Revision="1" Version="23.0.0.11" CompatibleVersions="23 22 21 22.0.2.1 22.0.1.0 22.0.0.9 21.0.3.0">
<Description>
&lt;b&gt;XRetrace macros&lt;/b&gt;
&lt;hr&gt;

This code provides diff region, beautify project, save/restore toolwindow layout,
float window at x:y, save / restore bookmarks.
&lt;p&gt;
Tested mostly in in V21.0.1 .  Most things should work in older versions.
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;show_xmenu1 :&lt;/b&gt;
popup menu of my favourite commands including all the stuff below.
Accelerator keys 1/2/3 do xfloat1/2/3.

&lt;li&gt;
&lt;b&gt;xbeautify_project :&lt;/b&gt;
beautifies all files in the active project.
By default it prompts with each file until you select "yes to all".
By default, files are automatically saved.

&lt;li&gt;
&lt;b&gt;xset_diff_region, xcompare_diff_region :&lt;/b&gt;
Used to compare a set of lines -
saves trekking through the diff dialog and setting up pathnames and line ranges.
The regions can be in the same or different buffers.
Use xset to assign the first region, move the cursor to the second region and
use xcompare to compare.  xset_diff_region will use selected lines
if there are any, otherwise it chooses 50 lines from current cursor position.
xcompare uses selected lines if any, otherwise compares from cursor position
for a length equal to the number of lines in the first region, plus 20.

&lt;li&gt;
&lt;b&gt;xsearch_workspace_cur_word_now :&lt;/b&gt;
searches the current workspace for the word at the cursor,
bypassing the find in files dialog.

&lt;li&gt;
&lt;b&gt;xsearch_cur_word :&lt;/b&gt; opens the find in files dialog with
word at cursor pre-selected.

&lt;li&gt;
&lt;b&gt;xfloat1/2/3 :&lt;/b&gt;
shows floating window at position 1/2/3 with
layout as previously set by xset_float1/2/3.
Data is read/ written to xuser-data.ini in the configuration folder.

&lt;li&gt;
&lt;b&gt;xsave_named_toolwindow_layout :&lt;/b&gt;
saves layout / position of all docked and floating toolwindows.
Data is saved to xtoolwindow-layouts.ini in the configuration folder.

&lt;li&gt;
&lt;b&gt;xload_named_toolwindow_layout :&lt;/b&gt;
restores layout / position of docked and floating toolwindows.
Data is read from xtoolwindow-layouts.ini in the configuration folder.

&lt;li&gt;
&lt;b&gt;xsave_bookmarks :&lt;/b&gt;
saves bookmarks to a file of your choosing in a "Bookmarks"
folder in the configuration folder.

&lt;li&gt;
&lt;b&gt;xrestore_bookmarks :&lt;/b&gt; loads bookmarks from a
file of your choosing in a "Bookmarks" folder in the configuration folder.
&lt;/ul&gt;

&lt;p&gt;
Plus miscellaneous explore / copy / open commands.
&lt;p&gt;
&lt;b&gt;SlickEdit 2018 update:&lt;/b&gt;
xload/save named toolwindow layout (and maybe other things)
no longer work in slick 2018.
I won't be fixing it in the near future.
</Description>

<Contents>
<Module Name="xmake_config_dirs.e" Load="0" Run="1"/>
<Config Name="_xretrcur.bmp" Path="xretrace/_xretrcur.bmp"/>
<Config Name="_xretrcur.png" Path="xretrace/_xretrcur.png"/>
<Config Name="_xretrdemod.bmp" Path="xretrace/_xretrdemod.bmp"/>
<Config Name="_xretrdemod.png" Path="xretrace/_xretrdemod.png"/>
<Config Name="_xretrinv.bmp" Path="xretrace/_xretrinv.bmp"/>
<Config Name="_xretrinv.png" Path="xretrace/_xretrinv.png"/>
<Config Name="_xretrmod.bmp" Path="xretrace/_xretrmod.bmp"/>
<Config Name="_xretrmod.png" Path="xretrace/_xretrmod.png"/>
<Config Name="abnornal-exit.png" Path="xretrace/abnornal-exit.png"/>
<Config Name="autosave-options.png" Path="xretrace/autosave-options.png"/>
<Config Name="DLinkList.e" Path="xretrace/DLinkList.e"/>
<Config Name="xblock-selection-editor.e" Path="xretrace/xblock-selection-editor.e"/>
<Config Name="xkeydefs.e" Path="xretrace/xkeydefs.e"/>
<Config Name="xnotepad.e" Path="xretrace/xnotepad.e"/>
<Config Name="xretrace.e" Path="xretrace/xretrace.e"/>
<Config Name="xretrace_control_panel.e" Path="xretrace/xretrace_control_panel.e"/>
<Config Name="xretrace_form.e" Path="xretrace/xretrace_form.e"/>
<Config Name="xretrace_popup.e" Path="xretrace/xretrace_popup.e"/>
<Config Name="xretrace_scrollbar.e" Path="xretrace/xretrace_scrollbar.e"/>
<Config Name="xtemp-file-manager.e" Path="xretrace/xtemp-file-manager.e"/>
<Config Name="xxutils.e" Path="xretrace/xxutils.e"/>
<Config Name="_f_d1.svg" Path="xretrace/bitmaps/_f_d1.svg"/>
<Config Name="_f_d2.svg" Path="xretrace/bitmaps/_f_d2.svg"/>
<Config Name="_xretrace-scrollbar-image1.png" Path="xretrace/bitmaps/_xretrace-scrollbar-image1.png"/>
<Config Name="_xretrace-scrollbar-markup-bookmark.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-bookmark.bmp"/>
<Config Name="_xretrace-scrollbar-markup-bookmark.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-bookmark.png"/>
<Config Name="_xretrace-scrollbar-markup-bookmark1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-bookmark1.bmp"/>
<Config Name="_xretrace-scrollbar-markup-changed-bookmark.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-bookmark.bmp"/>
<Config Name="_xretrace-scrollbar-markup-changed-bookmark.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-bookmark.png"/>
<Config Name="_xretrace-scrollbar-markup-changed-bookmark1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-bookmark1.bmp"/>
<Config Name="_xretrace-scrollbar-markup-changed-line.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-line.bmp"/>
<Config Name="_xretrace-scrollbar-markup-changed-line.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-line.png"/>
<Config Name="_xretrace-scrollbar-markup-changed-line1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-changed-line1.bmp"/>
<Config Name="_xretrace-scrollbar-markup-old-changed-line.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-old-changed-line.bmp"/>
<Config Name="_xretrace-scrollbar-markup-old-changed-line.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-old-changed-line.png"/>
<Config Name="_xretrace-scrollbar-markup-old-changed-line1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-old-changed-line1.bmp"/>
<Config Name="_xretrace-scrollbar-markup-visited-line.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-visited-line.bmp"/>
<Config Name="_xretrace-scrollbar-markup-visited-line.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-visited-line.png"/>
<Config Name="_xretrace-scrollbar-markup-visited-line1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-visited-line1.bmp"/>
<Config Name="_xretrace-scrollbar-markup-white.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-white.bmp"/>
<Config Name="_xretrace-scrollbar-markup-white.png" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-white.png"/>
<Config Name="_xretrace-scrollbar-markup-white1.bmp" Path="xretrace/bitmaps/_xretrace-scrollbar-markup-white1.bmp"/>
<Module Name="xload-macros.e"/>
<Command Exec="xload_macros"/>
</Contents>
</HotFix>

jporkkahtc

  • Senior Community Member
  • Posts: 1901
  • Hero Points: 184
  • Text
Re: github repo
« Reply #3 on: December 31, 2019, 10:42:05 pm »
Please feel free to use that repo.
I've added the first page to the Wiki.
Seems like the Wiki would be a great place for documentation.
I'm not sure what I have to do to allow you to edit it -- there is a thing where I can add "collaborators", but I need your email address to do that.

I'll have to take a look at that hotfix code.
Does that work OK when developing the macros, or is it just a good way to distribute them?

I've come up with something that works for me.
See the my post, reply #4 of: https://community.slickedit.com/index.php/topic,17302.msg67232.html#msg67232
for how I do it.

Basically, I have customized a number of Slick standard macro files and have a separate set of new macro files.
I put them all in %USERPROFILE%\Documents\Slickedit\24.0.1\..\Macros
To keep from cluttering the "Config" directory.


If that hotfix packaging works well we should be able to create a build process to create the Hotfix.zip files for people to download.

For versioning: Not sure what to do here, I just maintain a single current version and haven't worried about backwards compatibility. We should be able to do that either by embedded #ifdefs, or keeping separate folders/branches for each Slick version. Presumably, most new development would be only for the current version of Slick.

rowbearto

  • Senior Community Member
  • Posts: 1617
  • Hero Points: 118
Re: github repo
« Reply #4 on: December 31, 2019, 11:10:02 pm »
Instead of using the wiki for documentation, consider putting the documentation into markup or plain text files in the repo itself. That way the documentation can be version controlled and can also be available when one does a git clone.