使用Notepad++远程编辑WinSCP中打开的文本文件报错“file xxx does exist anymore”
我原来经常使用notepad++与WinSCP的配合,快速对远程Linux主机上的配置文件进行修改并保存。
最近在我的一台机器上,这个办法居然不灵了,有的时候可以,有的时候就报错:file does exist anymore. 如果keep in editor, 那也就无法保存到远程主机上了。
经过一番搜索,找到了参考资料部分记录的那篇文章。
因为当初乱点了个选项:
导致了这个问题,去掉就好了。
问题的解释如下:
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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 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 常用技术点