The gerund

Along with the infinitive and participle, the gerund in Spanish (as in English) is an nonfinite verb form (does not express person, number, tense, mood) that is generally used as a verb (unlike in English, where it can be used as a verb or noun), and as such, it may accept a subject, be it explicit or tacit. The gerund is used either in simple (cantando) or compound forms (habiendo cantado).

According to El buen uso del español, the subject is usually placed after the verb when it is explicit, and it may be placed before or after the verb when it is tacit.

Explicit verb: La economía del país mejorará sólo superando la crisis política.

Tacit verb: Sólo superando la crisis política mejorará. Mejorará sólo superando la crisis política.

Despite its verbal nature, the gerund can be used as an adjective in certain contexts.

El coche se malogró en plena autopista por el motor ardiendo.

Gerunds are frequently used with an imperative mood.

 ¡Marchando! 1, 2, 3, 1, 2, 3…

Because the gerund is imperfect form, it denotes an action or situation that is in progress, and as such, has not ended.

The simple gerund should be interpreted as something happening simultaneously with the action or situation of the main verb.

Iremos navegando el bote de Juan.

But it may also express a preceding immediacy.

 Preguntando en cada esquina, finalmente dimos con la dirección.

The compound gerund should be interpreted as something having happened prior, be it immediate or not, to the main verb.

 Se tomó unas cervezas habiendo conseguido un empleo después de buscar por mucho tiempo.