Update ch13_the_global_command.md

This commit is contained in:
ashfinal 2020-08-29 05:36:51 +08:00 committed by GitHub
parent 8f1cdf4054
commit 6f8c12d0df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -447,6 +447,12 @@ By the way, if you want to reduce multiple empty lines into no lines, instead of
:g/^$/,/./j
```
Or simpler:
```
:g/^$/-j
```
Your text is now reduced to:
```
@ -501,7 +507,7 @@ const arrayA = [
If you need to sort the elements inside the arrays, but not the arrays themselves, you can run this:
```
:g/\[/+1,/\v\]/-1sort
:g/\[/+1,/\]/-1sort
```
Result: