I often need to "turn off" environments. One way I do this is below in my minimal working example:
\documentclass{article}
\newenvironment{nothing}{\setbox0\vbox\bgroup}
{\egroup}
\begin{document}
Hello, this is some text.
\begin{nothing}
This is nothing.
\end{nothing}
More text.
Hello, this is some text.
More text.
\end{document}
Some space is added. How do I fix this?



\ignorespacesafter\egroupperhaps. Though the comment package might be better – daleif Jan 27 '16 at 18:25\stepcounter... works insidesavebox– touhami Jan 27 '16 at 19:00