  We present measurements of the spatial mapping between (hot) baryons and the
total matter in the Universe, via the cross-correlation between the thermal
Sunyaev-Zeldovich (tSZ) map from Planck and the weak gravitational lensing maps
from the Red Sequence Cluster Survey (RCSLenS). The cross-correlations are
performed on the map level where all the sources (including diffuse
intergalactic gas) contribute to the signal. We consider two
configuration-space correlation function estimators, $\xi^{ y-\kappa}$ and
$\xi^ {y-\gamma_{t}}$, and a Fourier space estimator, $C_{\ell}^{y-\kappa}$, in
our analysis. We detect a significant correlation out to three degrees of
angular separation on the sky. Based on statistical noise only, we can report
13$\sigma$ and 17$\sigma$ detections of the cross-correlation using the
configuration-space $y-\kappa$ and $y-\gamma_{t}$ estimators, respectively.
Including a heuristic estimate of the sampling variance yields a detection
significance of 6$\sigma$ and 8$\sigma$, respectively. A similar level of
detection is obtained from the Fourier-space estimator, $C_{\ell}^{y-\kappa}$.
As each estimator probes different dynamical ranges, their combination improves
the significance of the detection. We compare our measurements with predictions
from the cosmo-OWLS suite of cosmological hydrodynamical simulations, where
different galactic feedback models are implemented. We find that a model with
considerable AGN feedback that removes large quantities of hot gas from galaxy
groups and WMAP-7yr best-fit cosmological parameters provides the best match to
the measurements. All baryonic models in the context of a Planck cosmology
over-predict the observed signal. Similar cosmological conclusions are drawn
when we employ a halo model with the observed `universal' pressure profile.
