kairyou / SublimeTmpl

Create File From Templates for SublimeText 2 / SublimeText 3
https://xhl.me
MIT License
226 stars 68 forks source link

Why does it show the CR ? #12

Closed jiyiren closed 8 years ago

jiyiren commented 8 years ago

I install it in Sublime Text3 Build 3083 by git clone the url and it works.However,when I create a html template,it shows that: I save it named hah.html. And then I close the file,I opened it again,it shows that:

Please fix the problem!!

kairyou commented 8 years ago

Hi,

I have tested this package in Sublime Text3 Build 3103, it works normally.

One possible reason is that the git will convert LF to CRLF when checking out text files (Maybe, it is enabled by default on Windows).

You can try disable autocrlf via the Git Bash: git config --global core.autocrlf false and try to clone this repo again.

Or, install this package via package crontrol

Or, download the source in ZIP format from GitHub, and unzip it to "Packages" directory. (Replace the SublimeTmpl folder)

onethread commented 8 years ago

I'm actually getting the same problem on Build 3103 Windows, but my template files are not source controlled.

onethread commented 8 years ago

I found a workaround for my scenario. I changed the line ending type for my custom template to Unix, then saved it. Creating a new file based on that template with Windows line endings then works properly with no CRs.

kairyou commented 8 years ago

Thanks to both of you. This has been fixed in version 1.1.2.