WinSCP如何在进行远程编辑和保存的时候保留原有的换行符格式不变?Preserve line ending (LF vs. CR/LF) when editing

Issue/Problem:

I'm not sure how this bug hasn't been observed yet:

When the user saves a file they are editing in WinSCP, the line ending type is forced to CR/LF. Since the vast majority of files on Linux systems use LF only, this leads to all sorts of errors.

WinSCP should either detect and preserve the line ending type (best option), or (easy) force it to line feed only, which is supported on Windows by most applications, except toy ones like Notepad.

 

Solution:

The key is to un-tick an option in the Editors tab that reads 'Force text file mode for files edited in external editor' which can be found when you click 'Edit' on your external text editor.

 

Other key configuration sections:

WinSCP Login -> Environment -> "End-of-line characters (if not indicated by server)" and the setting was "LF" or "CR/LF" 

 

if want WinSCP to transfer file as is, please make sure you are using binary transfer mode:
http://winscp.net/eng/docs/transfer_mode


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值