Replacing quote marks around strings in Vim?

前端 未结 8 1583
遇见更好的自我
遇见更好的自我 2021-01-30 11:09

I have something akin to and need to change the single quotation marks to double quotation marks. I tried :s/\\\'.*\\\'/\

8条回答
  •  清酒与你
    2021-01-30 11:46

    You've got the right idea -- you want to have "\1" as your replace clause, but you need to put the "Hello There" part in capture group 1 first (0 is the entire match). Try:

    :%/'\(.*\)'/"\1"

提交回复
热议问题