Execute vim substitute command that includes '/' characters
问题 I have a java file in which I wrote /t, instead of \t, the proper notation of the tab escape function. I want to use vim’s substitution feature (:s) but when I do something like this: :%s//t/\t/g I get the error message E488: Trailing characters How can I write the command such that I can execute the substitution? Thank you. 回答1: Use backslash to escape the characters. So: :%s/\/t/\\t\g You can also use a different delimiter like: :%s@/t@\\t@g 回答2: Use colons instead of a slash to avoid