Replacing quote marks around strings in Vim?

前端 未结 8 1731
遇见更好的自我
遇见更好的自我 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:56

    Just an FYI - to replace all double quotes with single, this is the correct regexp - based on rayd09's example above

    :%s/"\([^"]*\)"/'\1'/g
    

提交回复
热议问题