  We re-examine direct CP violation in the quasi-two-body $D\to V\!P$ decays
and study CP asymmetries in three-body $D$ decays proceeding through
intermediate vector resonances within the framework of the topological
amplitude approach for tree amplitudes and the QCD factorization approach for
penguin amplitudes. As pointed out by us in 2012, the long-distance
penguin-exchange amplitude induced from final-state rescattering provides a
major source of direct CP violation in both $D^0\to K^+K^-$ and $D^0\to
\pi^+\pi^-$. It nicely accounts for the CP asymmetry difference between the
aforementioned two modes observed by the LHCb in 2019. The same mechanism
implies that CP asymmetry can also occur at the per mille level in many of the
$D\to V\!P$ channels. We point out six golden modes which have sufficiently
large branching fractions and direct CP violation of order $10^{-3}$. In
particular, the direct CP asymmetry difference $\Delta a_{CP}^{V\!P}$ between
$D^0\to K^+K^{*-}$ and $D^0\to \pi^+\rho^-$ is predicted to be
$(-1.61\pm0.33)\times 10^{-3}$, very similar to the corresponding CP asymmetry
difference observed in the $P\!P$ sector. In the absence of long-distance
QCD-penguin exchange contributions, $\Delta a_{CP}^{V\!P}$ will be negligibly
small. We find a positive and large CP asymmetry of order $10^{-3}$ in $D^0\to
K_S\bar K^{*0}$, an example that the asymmetry is induced at the tree level. It
is thus desirable to search for CP violation also in this mode.
  We take into account the flavor-singlet QCD-penguin contributions, which were
missing in our previous studies, to calculate their effects on the modes such
as $D\to\pi\phi$ and $D\to \eta \phi$. We compare our results with the other
approach in detail. For three-body $D$ decays, we perform the Dalitz plot
analysis of those decays mediated by several vector resonances with the same
mass but different electric charges.
