  [Abridged] The interstellar medium is observed to be organised in filamentary
structures, as well as neutral (HI) and ionized (HII) bubbles. The expanding
nature of these bubbles makes them shape their surroundings and possibly play a
role in the formation and evolution of interstellar filaments. We present APEX
$^{13}$CO and C$^{18}$O(2-1) observations of the NGC 6334 molecular cloud. We
investigate the gas velocity structure along and across the 50 pc-long cloud
and towards 75 identified velocity-coherent-filaments (VCFs). We measure a
wealth of velocity gradients along the VCFs. We derive the column density and
velocity power spectra of the VCFs. These power spectra are well represented
with power laws showing similar slopes for both quantities (with a mean of
about -2), albeit some differ by up to a factor of two. The position velocity
diagrams perpendicular to three VCFs show the V-shaped velocity pattern,
corresponding to a bent structure in velocity space with the filament at the
tip of the V surrounded by an extended structure connected to it with a
velocity gradient. This velocity structure is qualitatively similar to that
resulting from numerical simulations of filament formation from large-scale
compression from propagating shock fronts. In addition, the radial profiles
perpendicular to these VCFs hint to small-scale internal impacts from
neighbouring HII bubbles. The observed opposite curvature in velocity space
towards the VCFs points to various origins of large-scale external compressions
from propagating HI bubbles. This suggests the plausible importance of multiple
HI compressions, separated in space and time, in the formation and evolution of
molecular clouds and their star formation history. These latter atomic
compressions due to past and distant star formation events are complemented by
the impact of HII bubbles from present time and local star formation activity.
