How to remove quotes surrounding the first two columns in Vim?

前端 未结 8 1217
遥遥无期
遥遥无期 2020-12-15 21:53

Say I have the following style of lines in a text file:

\"12\" \"34\" \"some text     \"
\"56\" \"78\" \"some more text\"
.
.
.
etc.

I want

8条回答
  •  抹茶落季
    2020-12-15 22:29

    1. Start visual-block by Ctrl+v.
    2. Jump at the end and select first two columns by pressing: G, EE.
    3. Type: :s/\%V"//g which would result in the following command:

      :'<,'>s/\%V"//g
      

      Press Enter and this will remove all " occurrences in the selected block.

    See: Applying substitutes to a visual block at Vim Wikia

提交回复
热议问题