You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, in the section above, it says that This command also follows the form :g/pattern1/,/pattern2/command, but I can't find anything about this form from the doc
In my opinion, it should be illustrated like this:
:g is the global command pattern.
/\[/ is the only pattern. It matches a literal left square bracket "[".
+1,/\]/-1 is a range, it begins from the line below the current cursor position (current cursor is placed at [), to the line above ]. thus, if not abbreviated, it should be written as .+1,/\]/-1.
sort is the command-line command which the range applies.
If I add a dot before +1, it works well, that's why I think this explanation makes more sense.
The text was updated successfully, but these errors were encountered:
Thank you for your work! It's a really helpful guide and I learned a lot from it
https://github.com/iggredible/Learn-Vim/blob/master/ch13_the_global_command.md#advanced-sort
However, in the section above, it says that
This command also follows the form :g/pattern1/,/pattern2/command
, but I can't find anything about this form from the docIn my opinion, it should be illustrated like this:
:g
is the global command pattern./\[/
is the only pattern. It matches a literal left square bracket "[".+1,/\]/-1
is a range, it begins from the line below the current cursor position (current cursor is placed at[
), to the line above]
. thus, if not abbreviated, it should be written as.+1,/\]/-1
.If I add a dot before +1, it works well, that's why I think this explanation makes more sense.
The text was updated successfully, but these errors were encountered: