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

:%s/firstpattern/secondpattern/g

g for global, or to match all the found ones, not just the next one

you can also add c for confirm to the end, which will make vim ask for confirmation for each replace, so you can pick-and-choose



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

Search: