VI search and replace command examples

VI search and replace command examples

Let us say you would like to find a word called “foo” and replace with “bar”.
First hit [Esc] key
Type : (colon) followed by %s/foo/bar/ and hit [Enter] key.
:%s/foo/bar/

Comments

Popular posts from this blog

How to install Openbox

Setting Up Out-of-Office Messages in Outlook