[TxMt] Folder search and replace messes line endings

David Gasperoni mcdado at gmail.com
Mon Jun 15 13:01:06 UTC 2015


I can't pin exactly when this problem appeared, but if I perform a
`Find in Project` and choose to `Replace All`, TM will mess up with
line endings.

Example:

Search for: @import "variables"
Replace: @import "../variables"
Matching: *.scss

Now, if the files are not open, the result in the saved files is
literally like this:

LF//LF// Load core variables and mixinsLF//
--------------------------------------------------LFLF at import
"../variables";LF at import "mixins";LFLFLFLF//LF// ButtonsLF[...]

Where the string LF is literally written to file instead of a line
feed character. Files are LF-line-ended and utf-8 encoded. Opening the
resultant files after such replacements with other editors will also
show these strings in place of new lines.

With open files this doesn't happen because files are not saved to
disk after the replacement is performed, and everything seems correct
while they're open.

--
David Gasperoni


More information about the textmate mailing list