mirror of
https://github.com/iggredible/Learn-Vim
synced 2024-11-23 19:13:03 +00:00
Merge pull request #40 from Peilin-D/patch-1
Update ch13_the_global_command.md; Remove extra '/'
This commit is contained in:
commit
5f9de76cf9
1 changed files with 3 additions and 3 deletions
|
@ -136,9 +136,9 @@ To match the lines containing between three to six zeroes, run:
|
||||||
|
|
||||||
You can pass a range before the `g` command. Here are some ways you can do it:
|
You can pass a range before the `g` command. Here are some ways you can do it:
|
||||||
|
|
||||||
- `:1,5/g/console/d` matches the string "console" between lines 1 and 5 and deletes them.
|
- `:1,5g/console/d` matches the string "console" between lines 1 and 5 and deletes them.
|
||||||
- `:,5/g/console/d` if there is no address before the comma, then it starts from the current line. It looks for the string "console" between the current line and line 5 and deletes them.
|
- `:,5g/console/d` if there is no address before the comma, then it starts from the current line. It looks for the string "console" between the current line and line 5 and deletes them.
|
||||||
- `:3,/g/console/d` if there is no address after the comma, then it ends at the current line. It looks for the string "console" between line 3 and the current line and deletes them.
|
- `:3,g/console/d` if there is no address after the comma, then it ends at the current line. It looks for the string "console" between line 3 and the current line and deletes them.
|
||||||
- `:3g/console/d` if you only pass one address without a comma, it executes the command only on line 3. It looks on line 3 and deletes it if has the string "console".
|
- `:3g/console/d` if you only pass one address without a comma, it executes the command only on line 3. It looks on line 3 and deletes it if has the string "console".
|
||||||
|
|
||||||
In addition to numbers, you can also use these symbols as range:
|
In addition to numbers, you can also use these symbols as range:
|
||||||
|
|
Loading…
Reference in a new issue