在 Windows 上使用 GVim 编辑远程 Linux 文件?
如果我运行的是 Windows,是否可以使用 gvim 编辑远程 Linux 文件?
详细来说,我想通过 Putty 连接到 Linux 服务器,然后使用本地 gvim 实例编辑服务器上的文件 -- 这可能吗?
看起来 x11 转发(通过 xming?)可能是解决方案,但我无法让它工作。
远程服务器运行Debian;我的本地机器是Win7
Is it possible to use gvim to edit remote Linux files if I am running Windows?
To elaborate, I would like to connect to the Linux server via Putty and then use my local gvim instance to edit the files on the server -- Is this possible?
It seems x11 forwarding (via xming?) might be the solution but I cannot get it to work.
The remote server runs Debian; my local machine is Win7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这应该可以解决您的问题:
请参阅
:help netrw-putty
(以及在该文档页面中进行大量滚动)。This should fix you up:
See
:help netrw-putty
(and lots of scrolling around in that documentation page).您没有说明您使用什么协议通过 putty 访问文件,但 winscp 很可能会支持您想要的。 查看 http://winscp.net
You don't say what protocol you're using to access the files via putty, but odds are that winscp will support what you want. Check out http://winscp.net
就我个人而言,当我需要这样做时;我打开一个本地 gvim(速度更快一些;我在 WAN 上的 x11 转发方面遇到了问题)并且
每次都必须进行身份验证;但对于快速编辑效果很好。在 Linux 上;您可以使用 scp 而不是 ftp;但我不确定如何为此设置 Putty 转发...(上面的 netrw-putty 答案很可能考虑到了这一点,因此我投票了)
Personally, when I need to do this; I open up a local gvim (A little speedier; I have had issues with x11 forwarding over WAN) and do
You will have to authenticate each time; but works fine for quick edits. On linux; you can use scp rather than ftp; but I'm not sure how to setup the putty forward for that...(Most likely the netrw-putty answer above takes that into consideration, hence I am up voting it)
我的一个同事不久前用过类似的东西,但我从未尝试过。我更喜欢直接 ssh 到有问题的机器并启动 vim。
您是否看过此页面?这似乎就是您要找的。
An officemate of mine used something like this a while back, but I've never tried it. I prefer to just ssh to the machine in question and fire up vim.
Have you seen this page? It seems to be what you're looking for.