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

    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

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

    注意:在使用某版本的emacs时,出现连接到远程shell卡住的情况,于是下载了最新版本的emacs26.1。经测试,不需要编译tramh-sh.el文件,但是登陆时需要输入命令:

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

 

    在win平台安装了erlang后,便可以在.emacs增加如下配置:(参见The erlang mode for Emacs:http://erlang.org/doc/apps/tools/erlang_mode_chapter.html)

(setq load-path (cons "C:/Program Files/erl<Ver>/lib/tools-<ToolsVer>/emacs" load-path))

(setq erlang-root-dir "C:/Program Files/erl<Ver>")

(setq exec-path (cons "C:/Program Files/erl<Ver>/bin" exec-path))

(require 'erlang-start)

 

转载于:https://www.cnblogs.com/Jackie-Snow/p/9164320.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值