Merge pull request #103 from victorhck/master

mess in section in chapter 13?
pull/104/head
Igor Irianto 3 years ago committed by GitHub
commit 33cf5d944a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -533,9 +533,9 @@ const arrayA = [
]
```
:g/\[/+1,/\]/-1sort
This is great! But the command looks complicated. Let's break it down. This command also follows the form `:g/pattern1/,/pattern2/command`.
`:g/\[/` is the global command pattern.
- `:g/\[/` is the global command pattern.
- `/\[/+1` is the first pattern. It matches a literal left square bracket "[". The `+1` refers to the line below it.
- `/\]/-1` is the second pattern. It matches a literal right square bracket "]". The `-1` refers to the line above it.
- `/\[/+1,/\]/-1` then refers to any lines between "[" and "]".

Loading…
Cancel
Save