How can I include the period (.) in Vim’s search and replace command? (replacing .html extensions)? September 11, 2023 by Tarik Escape it. The . is a regex character which means “any character”, so you need to escape it with \. :%s/\.html/.php/g