1

I would like to replace all backslash followed by a 'n' in vim. Like: s\\n\\g example

2

:%s/\\n//g will simply remove every instance of \n.

:%s/\\n/(something else)/g will replace every instance of \n with (something else).

| improve this answer | |

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.