Issue #102 resolved

Make (g)& repeat substitutions

Michael Markert
created an issue

The relevant part of the Vim help:

{{{ & & Synonym for ":s" (repeat last substitute). Note that the flags are not remembered, thus it might actually work differently. You can use ":&&" to keep the flags. }}} {{{ g& g& Synonym for ":%s//~/&" (repeat last substitute on all lines with the same flags). Mnemonic: global substitute. {not in Vi} }}}

I just stumbled upon it and thought it to be a nice feature.

Comments (7)

  1. Frank Fischer repo owner

    Add commands for repeating the last substitution

    This includes the commands & (`evil-ex-repeat-substitute') and g& (`evil-ex-repeat-global-substitute') as well as `evil-ex-repeat-substitute-with-flags' eventually bound to :&&. All these commands simply call `evil-ex-substitute' with appropriate pattern/replacement/flags.

    This addresses issue #102.

    Wiki macro error: Changeset 95e0dde27cfe not found.

  2. Log in to comment