Configurable IDE sketch line separator
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
As I develop code in a multi-OS environment (modifying source code through both the Windows 10 IDE and a WSL - Ubuntu shell, collaborators using OS X, etc.), I would really like to avoid source files having all their line endings changed to the system "native" ending by the IDE upon file save as is currently occurring. Even if only one line of code is changed in the Windows IDE with a unix-formatted file, _every_ line is modified on file save due to the change in separator (`\n` → `\r\n`), resulting in a heavily polluted git diff/history if the code is being maintained in a repository. I did not notice this behavior in 1.8.5; the fix for issue #6736 is likely what changed.
I have no compelling reason to be using the IDE's "native" line separator in my source files as the IDE's OS is not consistent across the project development. Would it be possible to add the ability to configure the saved file line separator? Perhaps a `preferences.txt` entry that sets the system `line.separator` property (if that is all it takes)?
Contributor guide
Research direction
Start by tracing how the IDE saves source files and how preferences.txt is read, focusing on where the native line separator is selected. Verify the behavior with a Unix-formatted file edited in the Windows IDE; done means a configurable separator prevents unchanged lines from being rewritten and avoids polluted diffs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100