Menu

#1490 Shortcut closing last non-ended \begin{}

2.02_Stable
open
nobody
5
2016-12-30
2014-08-01
Anonymous
No

Here's what I'm looking for :
A keyboard shortcut that looks for the most recent (non-ended) \begin{env}, and adds \end{env} at the current point, Like so :

\begin{minipage}[0.45\textwidth]
\begin{center}
stuff
stuff
\end{center}

Using Ctrl-Space or whatever shortcut here would add \end{minipage}

It is good practice to write a \end command as soon as a \begin one is writed, but this command would still be useful because :

  1. It still saves half the typing, even if you use it immediatly.
  2. Sometimes you (I, anyway) go back in your code to add \begin{center}'s or \begin{minipage}'s for formatting.
  3. When you have a lot of user-defined environments like me, it would be a nice, easy alternative to adding them manually to the auto-completion.

This has been reported before ( http://sourceforge.net/p/texniccenter/user-reports/1239/ ), but closed, I believe, for the wrong reasons.

Discussion

  • Anonymous

    Anonymous - 2015-01-07

    please ! i <3 TeXnicCenter but im moving to another editor, just cuz of the lack of this feature

     
  • Anonymous

    Anonymous - 2015-09-21

    I find this feature extremely helpful when I am using Kile on a Linux machine. What happens there is that the program automatically types \end{[env_name]} in the line below the cursor the moment I write \begin{[env_name]} and press enter. It's a very helpful feature.

     
  • Anonymous

    Anonymous - 2016-12-30

    I can only agree to this. I like working with TeXnicCenter but am really missing this feature.

     

Anonymous
Anonymous

Add attachments
Cancel