Pond logo
Pond’s Place
StrongED accessories
Home  |  Music  |  Software  |  Photos  |  Panoramas  |  Wallpaper  |  Forum  |  More!

Software

  • StrongED tools v0.02
    (ZIP archive, includes Read Me, 6K)
  • CSS mode v1.00
    (ZIP archive, 5K)
  • Ruby mode v1.02
    (ZIP archive, 4K)
  • Ruby On Rails mode v1.02
    (ZIP archive, 8K)

Documentation

  • Read Me for StrongED tools v0.02
    Plain text, 3K

StrongED resources

Below are some things I've written for StrongED. StrongED is a text editor for RISC OS. Its Home page is here and you can find out more about RISC OS here.

The BASIC files in the first archive and material in the rest are dedicated to the Public Domain.

Public Domain Dedication

Contents

  1. Archive 1: Tools
  2. Archive 2: CSS mode
  3. Archive 3: Ruby mode
  4. Archive 4: Rails mode

Archive 1: Tools

To install the tools in the first archive, copy the BASIC files into !StrED_cfg.UserPrefs.Tools. The !StrED_cfg directory is usually held in !Boot.Choices. All of the tools assume a RISC OS-style directory structure with C and H folders rather than '.c' and '.h' files.

LoadApropo

If you are in a 'C' file, this will try and load an 'H' file of the same name, and vice versa. Typically, the tool is invoked from a keyboard shortcut such as Ctrl+H.

LoadHdrGbl

Given a C-style inclusion (e.g. Global/Services.h), this tool transforms the Unix pathname into a RISC OS pathname and attempts to load it through a variety of path variables. The local component directory is searched last. Usually, the tool is bound to a double-click on a line of the form #include <header>.

LoadHdrLcl

This tool works the same way as LoadHdrGbl, except the local component directory is searched first. Usually, the tool is bound to a double-click on a line of the form #include "header".

LoadLib

A supporting library containing a few functions used by the other three tools.

If you want to use the tools in the manner suggested above, you must modify the 'C' mode file. The easiest way to do this is to load a piece of 'C' code or open a blank text file and change into 'C' mode, open a menu over the document and select the 'C' entry with Shift held down. Look for the Search section. It should have lines for include1 and maybe include2, or just include. Delete or comment out these lines and add the following:

  include1  [_spct] '#include' _spct ('"') [_spct] @0 * @9 ('"')
  include2  [_spct] '#include' _spct ('<') [_spct] @0 * @9 ('>')

A little further down is the ClickList section. Again remove or comment out lines related to 'include1', 'include2' or 'include', and add the following:

  include1  SetTmp(include1, "Tmp$Word") Run("<Tmp$Tool>.LoadHdrLcl")
  include2  SetTmp(include2, "Tmp$Word") Run("<Tmp$Tool>.LoadHdrGbl")

These two lines set up double-clicks within #include lines for files included within double quotes (include1) or angle brackets (include2) to try and load a header file using the local directory first (double quotes case) or the local directory last (angle bracket case).

Next look for the text ^H to find an instance of the Ctrl+H key binding. Delete or comment out the existing definition if it is not already either absent or commented out and add the following - a good place is just before the definition for F10:

  Key       ^H
  Menu      Load H.*
  Icon      load
  Help      HCM_ld
  Select    SetTmp() Run("<Tmp$Tool>.LoadApropo")

This sets up Ctrl+H to load a C or H file of the same leafname as the current text, useful if you want to hop between a related source or header file when creating code. It only looks within the current component directory.

Header files are loaded using the following paths at present:

  C$Path
  CPP$Path
  TBox$Path
  TCPIPLibs$Path
  OSLibInclude$Path

However, it is trivial to change this by loading LoadHdrLcl and LoadHdrGbl into StrongED and amending the line towards the end of the file where tmp$path is set using the above path specifiers.

Version 0.02 of the archive uses up to date StrongED temporary variables rather than the legacy versions, so requires a reasonably new version of StrongED. The tools have been tested with v4.67 alpha 9 and should work with anything newer. A bug where locations of header files would be repeatedly appended to the search path until the path became too long to parse is fixed.

Archive 2: CSS mode

To install the CSS mode, find your installation of !StrongED and double click on the !StrongED in a Filer window whilst holding down Shift to open the contents. Go into the Defaults folder, then the Modes folder, to see all of the default modes in your installation. Open the Zip file from this site and copy the CSS folder inside, along with its contents, into the StrongED modes directory you just opened, alongside all the other modes.

Restarting StrongED will make it aware of the new mode - alternatively, opening the main StrongED menu from the icon bar and selecting "Rescan modes" may also be good enough to get the CSS mode noticed.

Further help is available from the StrongHelp manual inside the Zip archive, in CSS.Resources.UK.

Archive 3: Ruby mode

To install the Ruby mode, find your installation of !StrongED and double click on the !StrongED in a Filer window whilst holding down Shift to open the contents. Go into the Defaults folder, then the Modes folder, to see all of the default modes in your installation. Open the Zip file from this site and copy the Ruby folder inside, along with its contents, into the StrongED modes directory you just opened, alongside all the other modes.

Restarting StrongED will make it aware of the new mode - alternatively, opening the main StrongED menu from the icon bar and selecting "Rescan modes" may also be good enough to get the Ruby mode noticed.

The Ruby mode is designed to kick in for any Ruby file except those in directories using names that indicate they are part of a Rails application. This is to allow the Rails mode to kick in instead. For more information, please see the StrongHelp manual inside the Zip archive, in Ruby.Resources.UK.

Version 1.02 of the archive includes a fixed ModeWhen file with more robust behaviour particularly for files with a data filetype rather than plain text.

Archive 4: Ruby On Rails mode

To install the Ruby On Rails mode, find your installation of !StrongED and double click on the !StrongED in a Filer window whilst holding down Shift to open the contents. Go into the Defaults folder, then the Modes folder, to see all of the default modes in your installation. Open the Zip file from this site and copy the RubyRails folder inside, along with its contents, into the StrongED modes directory you just opened, alongside all the other modes.

Restarting StrongED will make it aware of the new mode - alternatively, opening the main StrongED menu from the icon bar and selecting "Rescan modes" may also be good enough to get the Ruby On Rails mode noticed.

The Rails mode deliberately attempts to only activate for Ruby files when those files sit in directories using names that indicate they are part of a Rails application. This is to allow the plain Ruby mode to kick in instead. For more information, please see the StrongHelp manual inside the Zip archive, in RubyRails.Resources.UK.

Version 1.02 of the archive includes a fixed ModeWhen file with more robust behaviour particularly for files with a data filetype rather than plain text.

Thanks to Philip Ludlam for the StrongED favicon.ico file.

Valid HTML 4.0 Valid CSS
A.D.Hodgkinson
Updated 08 Aug 2009
Creative Commons License The HTML, CSS and image files herein are
subject to a Creative Commons License