liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.51k stars 265 forks source link

Optionally convert newline style #132

Open FranklinYu opened 6 years ago

FranklinYu commented 6 years ago

This is a feature request. When I use VS Code on Windows, and sync the folder in Linux server, I want the file to be converted from LF to CRLF as line-ending when downloaded, and CRLF to LF when uploaded.

FranklinYu commented 6 years ago

Hello?

liximomo commented 6 years ago

Sorry. It's not possible currently.

penrods commented 6 years ago

Just adding my +1 to this request. I just ran across a case where this would be useful.

Thanks for the excellent plugin!

necmettin commented 5 years ago

You can use Git settings to do this (although you shouldn't have to convert those line endings, your other editor should be able to handle them). Check https://github.com/liximomo/vscode-sftp/issues/40#issuecomment-454539817 for an explanation of how Git works with CRLF.

FranklinYu commented 5 years ago

@necmettin What if I'm not using Git? VS Code doesn't depend on Git. Introducing Git for this simple feature sounds overkill.

In addition, there are some programmes in Windows that only support CRLF; the comment you linked does not explain how to work with CRLF on Windows, but how to avoid CRLF on Windows. That may or may not be the desired behavior.

That said, thanks for linking #40. It is indeed a related issue, but I would prefer to describe the issue as feature request instead of bug report, since preserving the newline character is pretty much expected.

necmettin commented 5 years ago

@FranklinYu Agree wıth all you said, BUT as far as I recall, similar apps (Notepad++ and Sublime) has this feature built into the editor, not to an extension.

After all, conversion of line-endings is more about the editing process than about SFTP transfers.

Although I also understand the request to have this in vscode-sftp.

pembeci commented 4 years ago

But I don't want to convert my file on Windows, I just need to send it to remote converted. So I think this falls in juristiction of SFTP clients.