Skip to content

Wrong :g command syntaxย #179

@Teagum

Description

@Teagum

The global command :g/^$/,/./-1j seems to be wrong since Vim >= 9.0 throws

E16: Invalid range: ,/./-1j

when I run this example given section Reduce Multiple Empty Lines to One Empty Line. Surprisingly the commands works nevertheless.

There must be another way to specify ranges in the cmd for :g.

A valid alternative to reduce multiple empty lines to only one empty line is

:g/^$/v/./j

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions