1. Frank Fischer
  2. evil
  3. Issues
Issue #195 resolved

:%g/\.$/j joins every line ending with a "." with the next one in Vim but not in Evil.

Titus von der Malsburg
created an issue

It says: {{{Unknown command: `j'}}}

Comments (4)

  1. Frank Fischer repo owner

    Ensure region/visual-state is ignored in ex-state

    When an operator is executed in ex-state, its range should never be specified by the current region or visual selection. If the visual selection should be used then the operator range should be specified by '<,'> in the ex command line.

    This patch ensures that evil-operator-range' never takes the visual selection into account when called in ex-state. Furthermore it ensures that no region is activated when the region is determined by a motion. This is important because only then the motion can define a range by setting (possibly reactivating) the region. This is typically the case for non-evil Emacs selection commands likemark-whole-buffer'.

    Another side effect of this is the global command `evil-ex-global'. When the global command is executed, the region is set to match the ex-range (so that non-evil operators that depend on the region can be used as ex-commands). Unfortunately that region would also influence the subsequent ex command that is executed by the global command on each matching line, which may lead to unexpected results (see #195). This change ensures that this region does not influence the subsequent ex commands anymore.

    This fixes #195.

    → <<cset 9a8dcdabc7ce>>

  2. Frank Fischer repo owner

    Ensure region/visual-state is ignored in ex-state

    When an operator is executed in ex-state, its range should never be specified by the current region or visual selection. If the visual selection should be used then the operator range should be specified by '<,'> in the ex command line.

    This patch ensures that evil-operator-range' never takes the visual selection into account when called in ex-state. Furthermore it ensures that no region is activated when the region is determined by a motion. This is important because only then the motion can define a range by setting (possibly reactivating) the region. This is typically the case for non-evil Emacs selection commands likemark-whole-buffer'.

    Another side effect of this is the global command `evil-ex-global'. When the global command is executed, the region is set to match the ex-range (so that non-evil operators that depend on the region can be used as ex-commands). Unfortunately that region would also influence the subsequent ex command that is executed by the global command on each matching line, which may lead to unexpected results (see #195). This change ensures that this region does not influence the subsequent ex commands anymore.

    This fixes #195.

    → <<cset 9a8dcdabc7ce>>

  3. Log in to comment