regexvisual-studio-codesearchvim-plugin

REGEX in vim search & replace (VS Code + macbook) not working?


I'm trying to edit a .md file in VS Code and I want to replace every tag starting with #+END_... with a space character (or just nothing). This is in VS Code 1.80.1 with the Vim extension installed, on Macbook Big Sur.

I've tried these:

10,20s/#+END\(.*\)\n//g
10,20s/#+END\(.*\)//g
10,20s/#+END\{.*\}\n//g

but every time VS Code says it doesn't find the pattern. What am I doing wrong? Do I have to tweak any particular config of the VIM extension in VS Code?

(I'm a bit new to VS Code, please help)

Here's a snippet of the text I'm trying to replace

enter image description here

EDIT 1

vs-code's VIM setting for RegEx


Solution

  • You can use

    10,20s/#\+END_.*//
    

    Explanation