First I would like to apologize for my english.
I would like to learn the makro language included in WinEdt. For this purpose I have choosen an "easy" task:
- Replace the text to the left of the cursor by \ac{TEXT} if the characters ".-" are entered.
So far, so good. I have added the following Active String
STRING=".-" ENABLED=1 MODE_FILTER="TeX" MACRO="[Exe('%b\Macros\Active Strings\Acronym.edt');]"
My current status of the file Acronym.edt is as follows:
// -*- ASCII:EDT -*- // Active String for \ac{} Backspace(2); SelWordLeft(1); UpperCase; InsText('\ac{%S}');
My problem is, that I don't know, how to expand the selection to the first space-character to the left of the cursur.
Example:
ab.- expands well do \ac{AB}, but ba-aa expands to ba-\ac{AA} instead of \ac{BA-AA}.