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
Code: Select all
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:
Code: Select all
// -*- ASCII:EDT -*-
// Active String for \ac{}
Backspace(2);
SelWordLeft(1);
UpperCase;
InsText('\ac{%S}');
Example:
ab.- expands well do \ac{AB}, but ba-aa expands to ba-\ac{AA} instead of \ac{BA-AA}.