-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacing multiple newlines #129
Comments
I believe this is a limitation of the Atom text buffer scan which operates on a line-by-line basis. I think it's tied up pretty heavily to the underlying data structure used by it (which seems to be a composite structure composed of lines) - this is linked to the fails being seen in the unit tests which fail to insert multiple newlines correctly (each newline is inserted after the current line.. instead of after the previous newline which was inserted). |
This is caused by a bug in text-buffer package. See atom/text-buffer#224 |
If I have a text file like this:
Then using Atom's find/replace, with regular expressions on, I can search for
\n\n
and replace with\n\nx
and, as expected, I end up with:But if, using ex-mode I do
:%s/\n\n/\n\nx /
then nothing happens.I can match and replace single newlines OK. e.g.
%s/\n/\nx /
gets me:Is there something I'm missing about being able to search for multiple newlines, or is this just not supported at the moment?
The text was updated successfully, but these errors were encountered: