In AUXtex there is the key binding macro C-c ]
which closes the lowest current TeX environment. For example
\begin{equation}
...
would be closed (by putting an \end{equation}
on a new line after where the cursor is located) when using this macro.
I'm now trying to cobble together a major mode for editing the input files to the EPOCH plasma physics PIC code. (Unfortunately the code is only accessible to members of the group, but there is an older version of the instruction manual available.) The types of files I want to build my plug-in for are like the example inputs in section 5 of the instruction manual.
My question is should I go about to get a similar functionality as the AUCtex macro in this major mode that I'm writing. More specifically, the EPOCH input files consist of several blocks of the form
begin:xyz
...
end:xyz
which I would like to be able to close through some cunning command or key binding in my mode definition.
begin:blockname
andend:blockname
there too. – Tobias Oct 23 '18 at 16:52