The combination of \addvspace{x}\addvspace{x} will cause the skip x but \addvspace{x}\noindent \addvspace{x} gives a 2x skip.

\documentclass{scrartcl}

\newenvironment{env}{%
\hspace*{2em}%
\begin{minipage}{0.5\textwidth}%
}{%
\end{minipage}%
\noindent\ignorespacesafterend%
}

\begin{document}
Line of text Line of text Line of text Line of text and
\begin{env}
--- \verb+env+ ---
\end{env}
no indent here. Line of text Line of text Line of text.

Next par (with indent). Line of text Line of text Line of text.
\begin{env}
--- \verb+env+ ---
\end{env}

Next par (with indent). Line of text Line of text Line of text.

\begin{env}
--- Two \verb+env+s following ---
\end{env}
\begin{env}
--- dont work with \verb+\addvspace+ ---
\end{env}
\end{document}


This example gives the doubled space. If i comment out the line \noindent\ignorespacesafterend% in the definition of {env} there is a single space with is the desired result but then the line no indent here ... will be indented which is not correct, I think.

Is it possible to make {env} behave like e.g. {equation}?

-
You should look at tex.stackexchange.com/questions/24495/… – egreg Jan 7 '12 at 14:22
With \noindent you're starting a paragraph; so the two \addvspace are not near to each other any more. – egreg Jan 7 '12 at 14:33
This is one for xgalley! – Joseph Wright Jan 7 '12 at 14:45
@JosephWright: I’m not shure if I understand your comment could you please explain it a little or add it as an answer? (I had a look hat xgalley.pdf but didn’t found something useful …) – Tobi Jan 7 '12 at 16:20
@Tobi It was a slightly flippant remark. The idea in xgalley is to address these issues in a very different way at a low level. So for example \noindent is not 'start a paragraph with no indent' but 'set a flag such that the next paragraph which starts will have no indent'. This allows additive treatment of vspace, but is currently experimental. In any case, unlike other LaTeX3 code you can't just load xgalley and expect everything to continue working as before. – Joseph Wright Jan 7 '12 at 16:22

The \noindentstarts a paragraph and if that is immediately followed by an empty line it will be and empty paragraph but still prevent \addvspace to look backwards and see the previous \addvspace. So this is not the right approach to get the paragraph indentation suppressed.

What you should do instead is a variation of \@endparenv namely to set a boolean switch that signals special processing inside \end{...}. I.e.,

\makeatletter
\newenvironment{env}{%
\hspace*{2em}%
\begin{minipage}{0.5\textwidth}%
}{%
\end{minipage}%