[TxMt] Re: Folder search and replace messes line endings

David Gasperoni mcdado at gmail.com
Tue Jun 16 08:24:13 UTC 2015


See video recording:
http://cl.ly/3o371B411R2T


See screenshots of Bundle Item Selector:
http://cl.ly/image/3y0I3R330j2Q
http://cl.ly/image/1r1F0b09120g


Here is my list of installed bundles, note though that I did disable the actions of Whitespace,
Ensure-New-Line-at-the-EOF and Strip-Whitespace-On-Save when trying to perform the replacement:

~/Library/Application Support/Avian/Pristine Copy/Bundles $ ls -1
DashMate.tmbundle
Ensure-New-Line-at-the-EOF.tmbundle
Homebrew Formula Syntax.tmbundle
JavaScript JSLintMate.tmbundle
Spacegray.tmbundle
Strip-Whitespace-On-Save.tmbundle
Tubster 2.tmbundle
Whitespace.tmbundle
base16-textmate.git Base16.tmbundle


Here are Hex dumps to show that there are actually L and F characters

BEFORE:
hexdump -C sass/addresses.scss 
00000000  40 69 6d 70 6f 72 74 20  22 63 6f 6d 70 61 73 73  |@import "compass|
00000010  22 3b 0a 40 69 6d 70 6f  72 74 20 22 74 68 65 6d  |";. at import "them|
00000020  65 5f 76 61 72 69 61 62  6c 65 73 22 3b 0a 0a 2f  |e_variables";../|
00000030  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000060  2a 2a 2a 2a 2a 2a 2a 0a  09 09 09 09 41 64 64 72  |*******.....Addr|
00000070  65 73 73 65 73 20 53 74  79 6c 65 73 0a 2a 2a 2a  |esses Styles.***|
00000080  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000000b0  2a 2a 2a 2a 2a 2f 0a 23  61 64 64 72 65 73 73 65  |*****/.#addresse|
000000c0  73 20 7b 0a 09 23 63 65  6e 74 65 72 5f 63 6f 6c  |s {..#center_col|
000000d0  75 6d 6e 20 7b 0a 09 09  2e 70 61 67 65 2d 68 65  |umn {....page-he|
000000e0  61 64 69 6e 67 20 7b 0a  09 09 09 6d 61 72 67 69  |ading {....margi|
000000f0  6e 3a 20 30 20 30 20 32  32 70 78 3b 0a 09 09 7d  |n: 0 0 22px;...}|
00000100  0a 09 09 70 20 7b 0a 09  09 09 6d 61 72 67 69 6e  |...p {....margin|
00000110  3a 20 30 20 30 20 31 33  70 78 3b 0a 0a 09 09 09  |: 0 0 13px;.....|
00000120  26 2e 70 2d 69 6e 64 65  6e 74 20 7b 0a 09 09 09  |&.p-indent {....|
00000130  09 6d 61 72 67 69 6e 3a  20 30 20 30 20 32 37 70  |.margin: 0 0 27p|
00000140  78 3b 0a 09 09 09 7d 0a  09 09 7d 0a 09 7d 0a 7d  |x;....}...}..}.}|
00000150  0a 0a 2e 61 64 64 72 65  73 73 20 7b 0a 09 6c 69  |...address {..li|
00000160  20 7b 0a 09 09 26 2e 61  64 64 72 65 73 73 5f 75  | {...&.address_u|
00000170  70 64 61 74 65 20 7b 0a  09 09 09 6d 61 72 67 69  |pdate {....margi|
00000180  6e 3a 20 31 34 70 78 20  30 20 36 70 78 20 30 3b  |n: 14px 0 6px 0;|
00000190  0a 09 09 09 61 20 7b 0a  09 09 09 09 6d 61 72 67  |....a {.....marg|
000001a0  69 6e 3a 20 30 20 31 30  70 78 20 30 20 30 3b 0a  |in: 0 10px 0 0;.|
000001b0  09 09 09 7d 0a 09 09 7d  0a 09 7d 0a 7d           |...}...}..}.}|
000001bd

AFTER:
$ hexdump -C sass/addresses.scss 
00000000  40 69 6d 70 6f 72 74 20  22 63 6f 6d 70 61 73 73  |@import "compass|
00000010  22 3b 4c 46 40 69 6d 70  6f 72 74 20 22 2e 2e 2f  |";LF at import "../|
00000020  74 68 65 6d 65 5f 76 61  72 69 61 62 6c 65 73 22  |theme_variables"|
00000030  3b 4c 46 4c 46 2f 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |;LFLF/**********|
00000040  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000060  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 4c 46 09  |*************LF.|
00000070  09 09 09 41 64 64 72 65  73 73 65 73 20 53 74 79  |...Addresses Sty|
00000080  6c 65 73 4c 46 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |lesLF***********|
00000090  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000000b0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2f 4c 46  |*************/LF|
000000c0  23 61 64 64 72 65 73 73  65 73 20 7b 4c 46 09 23  |#addresses {LF.#|
000000d0  63 65 6e 74 65 72 5f 63  6f 6c 75 6d 6e 20 7b 4c  |center_column {L|
000000e0  46 09 09 2e 70 61 67 65  2d 68 65 61 64 69 6e 67  |F...page-heading|
000000f0  20 7b 4c 46 09 09 09 6d  61 72 67 69 6e 3a 20 30  | {LF...margin: 0|
00000100  20 30 20 32 32 70 78 3b  4c 46 09 09 7d 4c 46 09  | 0 22px;LF..}LF.|
00000110  09 70 20 7b 4c 46 09 09  09 6d 61 72 67 69 6e 3a  |.p {LF...margin:|
00000120  20 30 20 30 20 31 33 70  78 3b 4c 46 4c 46 09 09  | 0 0 13px;LFLF..|
00000130  09 26 2e 70 2d 69 6e 64  65 6e 74 20 7b 4c 46 09  |.&.p-indent {LF.|
00000140  09 09 09 6d 61 72 67 69  6e 3a 20 30 20 30 20 32  |...margin: 0 0 2|
00000150  37 70 78 3b 4c 46 09 09  09 7d 4c 46 09 09 7d 4c  |7px;LF...}LF..}L|
00000160  46 09 7d 4c 46 7d 4c 46  4c 46 2e 61 64 64 72 65  |F.}LF}LFLF.addre|
00000170  73 73 20 7b 4c 46 09 6c  69 20 7b 4c 46 09 09 26  |ss {LF.li {LF..&|
00000180  2e 61 64 64 72 65 73 73  5f 75 70 64 61 74 65 20  |.address_update |
00000190  7b 4c 46 09 09 09 6d 61  72 67 69 6e 3a 20 31 34  |{LF...margin: 14|
000001a0  70 78 20 30 20 36 70 78  20 30 3b 4c 46 09 09 09  |px 0 6px 0;LF...|
000001b0  61 20 7b 4c 46 09 09 09  09 6d 61 72 67 69 6e 3a  |a {LF....margin:|
000001c0  20 30 20 31 30 70 78 20  30 20 30 3b 4c 46 09 09  | 0 10px 0 0;LF..|
000001d0  09 7d 4c 46 09 09 7d 4c  46 09 7d 4c 46 7d        |.}LF..}LF.}LF}|
000001de


--
David Gasperoni





More information about the textmate mailing list