# Autocomplete current environment

Is there a keyboard shortcut in TeXnicCenter to complete the current environment? In other words, it should add the appropriate \end{....}.

• Press Ctrl + Space. Jun 15, 2011 at 18:07
• Have a look at Tips on code completion on TeXnicCenter. Jun 15, 2011 at 18:35
• @doncherry: in that case, I'll recommend to always type \begin{<env>} \end{<env>} at once (and in this circumstances auto completion can be handy), and fill the contents afterwards; this helps to prevent forgetting to end an environment. Jun 15, 2011 at 19:29
• Obligatory emacs answer: C-c ] closes the current environment. Jul 1, 2011 at 10:24
• Sadly, it does seem that the correct answer is "there isn't". Oh well. It's the main feature I miss from Emacs. Jul 6, 2011 at 22:48

It seems that you are looking for a keyboard shortcut to take the input

\begin{pumpkinpie}
Tralala


and have TeXniccenter automatically close the environment with

\end{pumpkinpie}


(i.e. to close whatever the last environment opened was.) At present, the answer is 'TeXniceenter does not have such a function'. Perhaps lodge a feature request.

• Thanks! I've marked this as the accepted answer. I've filed a feature request (sourceforge.net/tracker/…) in case anyone else is interested. Jul 19, 2011 at 18:38
• Since the feature request above was closed by mistake, I filed a new one : sourceforge.net/p/texniccenter/user-reports/1490 . posting it here as it is one of the top google results
– imj
Aug 16, 2014 at 12:28
• I know it's been a while since this question was posted, but as a frequent user of TexnicCenter just wanted to ask if someone knows any update about it? I was just thinking on switching to some other editor but I'm so used to this one that makes the decision hard! thanks! Jan 11, 2020 at 21:03