For any principal bundle P, one can consider the subspace of the space of connections on its tangent bundle TP given by the tangent bundle TA of the space of connections A on P. The tangent gauge group acts freely on TA. Appropriate BRST operators are introduced for quantum field theories that include as fields elements of TA, as well as tangent vectors to the space of curvatures. As the simplest application, the BRST symmetry of the so-called BF-Yang–Mills theory is described and the relevant gauge fixing conditions are analyzed. A brief account on the topological BF theories is also included and the relevant Batalin–Vilkovisky operator is described. © 1998 American Institute of Physics.