<p>Is there a way to <em>always</em> have LF line endings in Visual Studio? I can never seem to find it!</p>

[{'answer_id': 1235175, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': "<p>Visual Studio 2008 doesn't retain the advanced save options after the solution is closed.  I would be willing to hand edit a lot of files if that would make it work consistently, but I am not willing to change all of the settings every time I open VS.</p>\n\n<p>This is too bad.  Since VS does support forcing the line-endings to whatever is desired in the backend, its just not hooked up properly in the UI.  Maybe Microsoft will fix this isn a service pack.</p>\n"}, {'answer_id': 1288642, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 6, 'selected': False, 'text': '<p>There\'a an add-in for Visual Studio 2008 that converts the end of line format when a file is saved. You can download it here: <a href="http://grebulon.com/software/stripem.php" rel="noreferrer">http://grebulon.com/software/stripem.php</a></p>\n'}, {'answer_id': 14201090, 'author': 'user1955769', 'author_id': 1955769, 'author_profile': 'https://Stackoverflow.com/users/1955769', 'pm_score': 2, 'selected': False, 'text': '<p>Yes, there is a way to always have LF line endings, at least in Visual Studio 2010 Pro. </p>\n\n<p>Go to <code>Tools | Options... | Environment | Documents</code></p>\n\n<p>Then Enable the <strong>Check for consistent line endings on load</strong> option.</p>\n\n<p>It works for me.</p>\n'}, {'answer_id': 20077654, 'author': 'renadeen', 'author_id': 907467, 'author_profile': 'https://Stackoverflow.com/users/907467', 'pm_score': 3, 'selected': False, 'text': '<p>You don\'t have to install any plugins.\nAs mentioned <a href="https://stackoverflow.com/questions/3802406/configure-visual-studio-with-unix-end-of-lines">here</a> you can configure line endings in <code>File -&gt; Advanced Save options...</code></p>\n'}, {'answer_id': 32986343, 'author': 'GLADIATORCOP', 'author_id': 4613731, 'author_profile': 'https://Stackoverflow.com/users/4613731', 'pm_score': 0, 'selected': False, 'text': "<p>There's a plugin to VS called Strip'Em where you can choose which kind of new line type you want to auto convert all the line endings to when saving.</p>\n\n<p>(You can choose between LF, CRLF, CR.)</p>\n"}, {'answer_id': 36481881, 'author': 'trindflo', 'author_id': 3285233, 'author_profile': 'https://Stackoverflow.com/users/3285233', 'pm_score': 0, 'selected': False, 'text': '<p>I seem to have found a method by accident and found this article attempting to correct it (I want Windows CRLF EOL)!  Doing the following results in UNIX (LF only) line endings for me.</p>\n\n<pre><code>SaveFileDialog^ dialog = gcnew SaveFileDialog();\nSystem::Windows::Forms::DialogResult DR;\ndialog-&gt;Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";\ndialog-&gt;FilterIndex = 2;\ndialog-&gt;RestoreDirectory = true;\ndialog-&gt;DefaultExt = "txt";\nDR = dialog-&gt;ShowDialog(this);\nif ( DR == System::Windows::Forms::DialogResult::OK )\n{\n    // Get the page (tab) we are currently on\n    System::Windows::Forms::TabPage ^selPage = this-&gt;tabControl1-&gt;SelectedTab;\n\n    // Note: technically the correct way to look for our control is to use Find and search by name\n    // System::Windows::Forms::RichTextBox ^selText = selPage-&gt;Controls-&gt;Find("rtb", false);\n    // I only add one control (rich text) so first control ([0]) must be it\n    System::Windows::Forms::RichTextBox ^selText = safe_cast&lt;System::Windows::Forms::RichTextBox^&gt;(selPage-&gt;Controls[0]);\n\n    // Just let a Windows forms method do all the work\n    File::WriteAllText(dialog-&gt;FileName, selText-&gt;Text);\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/45207', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4121/']