Continuous unitary transformations can be used to diagonalize or
approximately diagonalize a given Hamiltonian. In the last four years, this
method has been applied to a variety of models of condensed matter physics and
field theory. With a new generator for the continuous unitary transformation
proposed in this paper one can avoid some of the problems of former
applications. General properties of the new generator are derived. It turns out
that the new generator is especially useful for Hamiltonians with a banded
structure. Two examples, the Lipkin model, and the spin--boson model are
discussed in detail.