From 7252415526b1d5fe28d0d7ed169c80cd0f482e81 Mon Sep 17 00:00:00 2001 From: Victorhck Date: Fri, 7 May 2021 18:49:05 +0200 Subject: [PATCH] mess in section in chapter 13? --- ch13_the_global_command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch13_the_global_command.md b/ch13_the_global_command.md index 8c41a5d..8d15056 100644 --- a/ch13_the_global_command.md +++ b/ch13_the_global_command.md @@ -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 "]".