I have this markdown line,


I want to replace it with,


So, I tried this,


Vim(version 81) says pattern not found.


1 Answer 1


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
    – atheros
    Nov 17, 2020 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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