Emacs在Windows下可以使用Plink.exe来通过SSH访问编辑远程服务器上的文件。首先需要下载PuTTY,将PuTTY放在任意目录,然后在.emacs之中加入:

elisp(require 'tramp)

(setq exec-path (cons "E:/PuTTY" exec-path))

(setq tramp-default-method "plink")
(setq tramp-shell-prompt-pattern "^[ $]+")

之后就可以使用命令来打开远程服务器文件了,跟GNU/Linux下不太一样,少了SSH前缀:

/users@localhost:/folder/file

venmos
462 声望15 粉丝

Maccon, Emacscon, Lolicon, ACG. False geek, Looks like a quiet guy. Love open source, Loves photography and outdoor sports. Favorite programming language is Ruby and Lisp.