[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Re: S & R query



In message <56b8bc8f85Lists@xxxxxxxxxxx>
          "Richard Torrens (lists)" <Lists@xxxxxxxxxxx> wrote:

> In article <29a4bab856.Alan.Adams@xxxxxxxxxxxxxxxxxxxxxx>,
>    Alan Adams <alan@xxxxxxxxxxxxxxxx> wrote:
>
> > For example I have just noticed that in the examples, things like @1 
> > and {X} are separated by spaces. When I was trying to construct such 
> > things I didn't put spaces in, as i didn't want it looking for spaces 
> > there. Of course, it would not be, as the spaces would have to be in 
> > quotes for that to be the case, but it wasn't intuitive.
> 
> Correct. Spaces outside quotes are ignored.

The StrongED manual describes space as the 'AND' operator. This is not
entirely accurate though as ("a" | "b") means "a" or "b", it does not
mean "a" and or and "b".

Most spaces outside quotes are ignored but in some cases they are not.
You can't write (\a) as (\ a), in ({.}+) the + must come immediately
after the }.

In general, you put spaces between elements but not between the
individual parts of an element.

> > Are the spaces between "keywords" necessary, or just to improve 
> > readability?
> 
> > Is there a way to create long expressions outside the relatively small 
> > window?
> 
> Both covered in the page. Let me know how successfully I have explained.

Another way to transfer the S&R strings is this:

  - Select the search string
  - Copy it to the clipboard (cs-C)
  - Select the replace string
  - Open the S&R dialogue box (s-F4)
  - Paste the search string (c-V)
  - Move to replace field (Down or Tab)
  - Copy replace string (F7)

> > Is there a wasy to store commonly used ones for future use?
> 
> Yes - in the Mode files, which will take a bit of explaining.

Search expressions can be added to the Search section of a ModeFile, and
replace expressions to the Replace section.

If the expression is specific for a given mode then you add it to that
mode's ModeFile. A search for a BASIC keyword would be added to the
BASIC mode.

Expressions that are not mode specific can be added to the BaseMode
ModeFile so that they can be used in any mode.

There's also the global Patterns file. This is a cut-down ModeFile that
only supports the Search and Replace sections. You can store expressions
here if you don't want to alter the BaseMode ModeFile.

StrongED ships without a Patterns file but you can create one in
StrED_cfg.UserPrefs.Global.

When you use a named expression in a dialogue box StrongED will look for
it in the following order:

  - Current mode
  - BaseMode
  - Patterns file

More details here: http://diy.torrens.org/RO/StrongED/man/patterns.html

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://diy.Torrens.org/RO/StrongED/index.html