vontio / sublime-line-endings-unify Goto Github PK
View Code? Open in Web Editor NEWbatch change files endings
batch change files endings
Hi @vontio,
This is part issue and part a plea for help :/
I recently ran this script in a sublime instance on my (Windows) development PC. Unfortunately I was under the impression that it would process open files, not every folder open in my project. I happened to have a large number of folders open at the time. As you would expect, this corrupted a very large number of binary files on my development computer (word documents, excel files, images, power points etc). The script also corrupted all my git repos (See #5).
Many of these were under git control - after blowing away the folders I could clone again and everything was fine. Unfortunately there were a handful of binary files that were only local, and not yet committed to version control. Some of these are very important files that I would very much like to recover.
Suggestions from an issue point of view:
README.md
warning about backing up files much, much more prominent - maybe move to the top of the file?install.txt
warning about backing up files much, much more prominent - maybe move to the top of the file?Thanks for the assistance,
The plugin crashes and this error is output to the console.
Traceback (most recent call last):
File "LineEndingsUnify in /Users/alex/Library/Application Support/Sublime Text 3/Installed Packages/Line Endings Unify.sublime-package", line 37, in onInputExtensions
File "LineEndingsUnify in /Users/alex/Library/Application Support/Sublime Text 3/Installed Packages/Line Endings Unify.sublime-package", line 22, in unifyLineEnding
File "./encodings/ascii.py", line 26, in decode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 470: ordinal not in range(128)
I'm on a MacBook Air with ST3, stable channel, build 3083.
I came across this plug-in, because its a pain to manually change each file, every single time..
But just because i'm on windows doesnt mean i want windows line endings.
ADD Option to set Default TAB or SPACE, Personally I use the same settings for EVERY file,
if it set it every time on Auto, that would would be great.. Normally if you set the line ending then you ALSO set the tab or space as well, they kinda go hand in hand.
Some ideas to add onto this to make it better..
{
"global": {
"use_global": true,
"per_fileType": false
},
"global_settings": {
"charset": "UTF-8",
"line_ending": "unix",
"indent": ["tab", "4"]
},
"per_file_settings": {
"php": ["UTF-8", "unix", "tab", "4"],
"html": ["UTF-8", "unix", "space", "3"]
}
}
You get the idea, but you can either set a GLOBAL or PER_FILETYPE.. GLOBAL overrides everything
This would be the PERFECT Plug-In, is it possible to make this run ON FILE OPEN ?
every file that is opened, it would Auto Set these properties.
So it crashes when it tries to run.
It should probably ignore hidden folders by default, or at least provide an option to ignore a list of folders (with some sensible defaults)
Searching through the repository I cannot find any mention to open source licence. By this project being on Github, I am allowed to fork it by the Github TOS (Terms Of Service). However I am not allowed to create derivative works from it (pull requests). Meaning I cannot fork this repository, change its code and perform pull requests without the danger/liability of being prosecuted by violating the All rights reserved
copyright granted by berne convention law.
The original prime theme for Sublime Text has the licence following open source licence:
The MIT License (MIT)
Copyright (c) 2014 Karel Vuong
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Can the project have the same licence?
Related issues:
In the documentation, it says that it will set windows line endings if you're on windows. That's not what you want necessarily!
In the node_modules folder in the @babel library, a LICENSE file without any extension was found in several dozen subfolders. The line endings in these files were not changed by the plugin, which required manual changes. Trying to use a space or two commas in a row in the selection of extensions did not have any effect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.