editorconfig / editorconfig-visualstudio

EditorConfig Visual Studio Addin
http://editorconfig.org
Other
355 stars 75 forks source link

Added support for fixing EOL's when applying settings if the current fil... #15

Closed scottbilas closed 8 years ago

scottbilas commented 10 years ago

...e has an EOL setting chosen for it.

This is important when using ReSharper, which only supports CRLF(*). If you have a file type set to LF, and then do any edits or refactors where ReSharper is involved, the file will get saved out with mixed EOL's. This commit will work around the ReSharper limitation.

(*) Is an issue for all ReSharpers up to at least 8.2.1; see https://youtrack.jetbrains.com/issue/RSRP-274916

Mpdreamz commented 10 years ago

@scottbilas thanks for this! This totally flew under my radar will try and review it this week.

scottbilas commented 9 years ago

Ping. :)

paweljasinski commented 9 years ago

This patch rocks! I have only a small suggestion for improvement. In case end_of_line is not set, replicate line ending of the first line. https://github.com/paweljasinski/editorconfig-visualstudio/commit/47cf47fb70f5722ae2735b3b05ac08df8ee021d9 We got quite a few mixed line endings in repo because of the way VS pastes text. It is a known problem and MS is not eager to fix it: https://connect.microsoft.com/VisualStudio/feedback/details/725717/visual-studio-code-editor-doesnt-do-newline-conversion-on-paste

matiasbeckerle commented 9 years ago

I'm here just to add +1 to this PR. Thanks for doing this :smile:.

Mpdreamz commented 9 years ago

LGTM :+1: pulling this in, thanks for submitting this @paweljasinski :smile:

ghost commented 9 years ago

Any idea when this will be released? I don't have ReSharper, but somehow I keep getting CRLFs in my javascript files.

ghost commented 9 years ago

For now I am using the Line Endings Unifier extension, but it only works for js files and I need it to work for all sorts of file types.

scottbilas commented 8 years ago

this PR is no longer required