The basic format I need it in is this.


So I want it to search the entire file and ask for confirmation for every match found.

  • :%s/"/'/c? I am confused what your question is, as you already mentioned the :s command yourself? Are you having problems with it? If so, which? – Martin Tournoij May 24 '17 at 14:21
  • @Carpetsmoker I wondered the same thing myself, and took a guess that the missing g flag was the issue. – Rich May 24 '17 at 14:59
  • That seems likely @Rich. Would still be good if the OP would clarify the question to confirm (questions are supposed to be useful for others too, after all). – Martin Tournoij May 24 '17 at 15:31
  • I used the exact syntax you referenced CarpetSmoker. Maybe I had a typo or a weird issue with Bash on Windows? – JasparLamarCrab May 24 '17 at 23:13



The g is important, because otherwise the command will only replace the first " on each line.

  • This worked. I thought I was typing exactly that; either I was searching the wrong file, or I need to slow down and pay attention to what I'm typing. I feel like a goofball right now, lol. – JasparLamarCrab May 24 '17 at 23:20
  • @JasparLamarCrab It happens to all of us! :) – Rich May 25 '17 at 8:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.