Replacement command
Books has a very powerful replacement command that can be accessed by typing "/w --replace".
| Command | Meaning |
|---|---|
/w --replace foo bar | Replace the word foo with the word bar |
/w --replace foo | Remove the word foo |
/w --replace "this sentence" "other sentence" | Replace this sentence with other sentence |
Once you've executed a replacement command, you will see a screen similar to this one:
![]()
As seen in the picture you need to confirm the replacement using "/w --confirm". You may also use the short version "/w -c":
| Command | Meaning |
|---|---|
/w --confirm 0-2 | Replace the match 0, 1 and 2 |
/w -c 0-2 | Same as above |
/w -c 2-5 10 | Replace the match 2, 3, 4, 5 and 10 |
/w -c 4 6 | Replace the match 4 and 6 |
Comments