Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you escape the & character? I have been bit by this (not escaping &) a few times but never enough to have found the answer.


The same way you escape anything - with a \. E.g. if you wanted to substitute the character x with the sequence &/\ you would type

:s/x/\&\/\\




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: