I have this markdown line,


I want to replace it with,


So, I tried this,


Vim(version 81) says pattern not found.


You need to escape the opening square bracket:


For the whole replace, you can use:


  • Yes worked!! I did it two times for opening and closing brackets. :%s/\[s/(s/g and :%s/\g]/g)/g
    – losethos
    Nov 17 '20 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.