mirror of
https://github.com/iggredible/Learn-Vim
synced 2024-11-13 22:47:07 +00:00
Fix the wrong substitute command
This commit is contained in:
parent
5c5082aeb5
commit
ec525673e7
1 changed files with 1 additions and 1 deletions
|
@ -523,7 +523,7 @@ bonjour vim
|
|||
You need to substitute the word "vim" with "friend" but only on the lines containing the word "hello" or "hola". Recall from earlier this chapter, you can use `|` for multiple alternative patterns.
|
||||
|
||||
```
|
||||
:%s/\v(hello|hola) vim)/\1 friend/g
|
||||
:%s/\v(hello|hola) vim/\1 friend/g
|
||||
```
|
||||
|
||||
The result:
|
||||
|
|
Loading…
Reference in a new issue