Replacing quote marks around strings in Vim?

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

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

    You will want to use [^']* instead of .* otherwise

    'apples' are 'red' would get converted to "apples' are 'red"

提交回复
热议问题