Being able to select line endings CRLF - LF

When I’m working on windows would be nice to select the type of line endings in new files or in that vault. In general I need CRLF - UTF-8 and Obsidian right now only create LF files.

24 Likes

Especially as Obsidian is multi-platform, this would be very helpful. I often paste into Obsidian from code, which will use one or the other of these line endings. It’s frustrating when I copy something with “the wrong one” and all the linebreaks are doubled. Anyway, a plugin or setting for this would be great if possible. Thank you.

2 Likes

Is that feature included already or does a plugin exists? During may research i could not find that information.

What about this? Every time I edit a file on mobile it changes the EOL characters. I don’t know why this isn’t considered a bug. The app should support multi-platform / multi-app editing smoothly. Every other editor I use has the ability to configure and/or change the EOL character.

1 Like

Really need this feature! Maybe add auto guessing feature like vscode too.

This is still an issue, its especially annoying that it auto-saves the file even when it hasn’t been modified.

3 Likes

If it could just respect the line ending established in the file, it would be ideal.

1 Like

It’s a big problem for me to be limited to LF, I absolutely need CRLF. So here is my vote for this feature.

For those who use Obsidian Git, I found this:

This solves the problem in using git on windows.
Personally, I prefer to set core.autocrlf to false in the system configuration (when installing git).
Today, Windows can handle LF line ending files without problem.

But, it is not clear if this is the problem that people are having to need this feature. This solves the problem with git, but maybe there are other issues that this behaviour is the cause.

1 Like

In at least some cases, pasting with CTRL+SHIFT+V strips out an additional CR (or LF?) that would otherwise be created. I haven’t tested this extensively, but it works when pasting from some apps on Windows.

Yeah this was exactly what I suggested in the reply above you. This was it for me.

It is not just annoying , it is a bug, I think

It is very annoying when I backup my vaults in obsidian git. Everytime I need to backup my whole file from LF to CRLF or Vice Versa