Use / without \ in a search string

Are you sick of using escape character “\” while searching-replacing a long string with ‘/’ in them? Then here is the solution

suppose you want to replace all ‘/’ with “.” in a long string like “soc_tb/smca/par_glm1/pcs_cdu_glm1/pcs_cdu_glm1_plm/plm/mux_body/all_disable”

Instead of doing the following


do this


VIM does not require you to use “/” for search and replace. So instead of this


you can use any other character. I prefer “#”. So this is what I do


The advantage is that now you can freely use “/” in your string without worrying about escape character “\” madness

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s