I would like to put a newline after every tag in an HTML file in Emacs. Now I have got
M-x query-replace-regexp \(<[^>]*>\) --> \1\n
This returns
invalid use of "\"
I've already tried C-x C-j, but that returns <html>C-x C-j<head>C-x C-j etc...
If anybody knows the solution, that would be helpful :)
You can use C-q to insert control characters.
C-q C-j to insert a newline, C-q C-i to insert a tabulator etc.
So instead of \n just type C-q C-j.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With