使用Notepad++远程编辑WinSCP中打开的文本文件报错“file xxx does exist anymore”

我原来经常使用notepad++与WinSCP的配合,快速对远程Linux主机上的配置文件进行修改并保存。

最近在我的一台机器上,这个办法居然不灵了,有的时候可以,有的时候就报错:file does exist anymore. 如果keep in editor, 那也就无法保存到远程主机上了。

image


经过一番搜索,找到了参考资料部分记录的那篇文章。


因为当初乱点了个选项:

image


导致了这个问题,去掉就好了。


问题的解释如下:

You have the "External editor opens each file in separate window (process)" editor preference option enabled. That's what causing the problem.

The option is by default unchecked and should be checked only when you use an editor that opens each file in a separate process. That is not the case of Notepad++: When you open the file for editing in WinSCP and the Notepad++ is already running, the new Notepad++ instance just delegates the opening to the existing instance and exits. As you have the above option on, WinSCP detects the exit and considers the file to be closed (deleting it).

For details, see WinSCP documentation for Opening more files in a single editor instance.


大致意思是说,这个选项导致了这个问题,因为选项的意思是每次都使用一个新的编辑器的实例(instance)来编辑文件,而notepad++是会代理到已经打开的instance上再开一个tab,而这个代理的过程WinSCP不认,于是就报文件不存在了。

去掉这个选项,问题就解决了。


参考资料

============

WinSCP and Notepad++: File does not exist anymore?

https://superuser.com/questions/989538/winscp-and-notepad-file-does-not-exist-anymore

posted on   中道学友  阅读(1266)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2009-06-22 SharePoint Support Engineer 常用技术点

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

技术追求准确,态度积极向上

点击右上角即可分享
微信分享提示