windows下使用emacs+plink编辑远程文件

    1)plink.exe属于putty套件, 注册到环境变量;emacs的bin目录也要注册到环境变量中;

    2)在.emacs中增加如下:

(require 'tramp)
(setq tramp-default-method "plink") ;; 这样在emacs的minibuffer中C-x C-f之后就不必再输入/plink:
(byte-compile-file "E:/tools/emacs-24.3/lisp/net/tramp-sh.el") ;; 避免错误: Couldn't find proper 'ls' command

    3)打开控制台, 输入emacs打开编辑器(注意如果是双击emacs.exe会出现plink命令找不到的问题), 然后输入:

C-x C-f /username@remote_ip:directory

    输入密码便可打开远程目录。

猜你喜欢

转载自www.cnblogs.com/Jackie-Snow/p/9164320.html