Tutorial by Examples

This command: :s/foo/bar/g substitutes each occurrence of foo with bar on the current line. fool around with a foodie becomes barl around with a bardie If you leave off the last /g, it will only replace the first occurence on the line. For example, :s/foo/bar On the previous line wou...
This substitute command can use Regular Expressions and will match any instance of foo followed by any( one ) character since the period . in Regular Expressions matches any character, hence the following command will match all instances of foo followed by any character in the current line. :s/foo....

Page 1 of 1