Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong :g command syntax #179

Open
Teagum opened this issue Nov 19, 2023 · 0 comments
Open

Wrong :g command syntax #179

Teagum opened this issue Nov 19, 2023 · 0 comments

Comments

@Teagum
Copy link

Teagum commented Nov 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant