WinEdt Macro Library  | LaTEX previous macro  | next macro


This is an extended version of the macro that is defined as the response to the Active String \begin{?}> in the default setup of WinEdt 5.3. It is meant to replace it.


This macro lets you quickly change a LaTEX environment.

There are two ways to use this macro: You can either define an Active String, so that you invoke the macro by typing a ">" behind the environment that you want to change. Or you can run the macro manually (resp. via a shortcut) from anywhere within the environment you want to change. Or both.

The macro will find the \begin and \end commands of the current environment, highlight them and present you a list of environments. It is also possible to delete the current environment or to define an environment that is not in the list.

The package consists of the following files:

changeEnv.edt including documentation
changeEnv.cfg contains the list of environments

Installation Instructions

Unzip the file in %b\Macros\LaTeX\.

To define an Active String,

  • Go to Options | Settings | Active Strings,
  • Right-click in the list and insert a new item: "\begin{?}>", and maybe also "\end{?}>",
  • Define the Action:
  • Check the box before "On Type" and define it as "TeX".

In the default setup of WinEdt 5.3, this is already set up.

The macro also works for $$...$$ and \[...\], and for any other environment, as long as WinEdt is able to find the matching delimiter. You can set them up as Active Strings, too.

Note that the filename of the configuration file has changed from the previous version. Also note that the old configuration file is not compatible with this version.



Macro contributed by Robert <>.

WinEdt Macro Library  | LaTEX previous macro  | next macro