Using Node.js with JS-comint in Emacs

帅比萌擦擦* 提交于 2019-11-27 21:23:29
(setq inferior-js-mode-hook
      (lambda ()
        ;; We like nice colors
        (ansi-color-for-comint-mode-on)
        ;; Deal with some prompt nonsense
        (add-to-list
         'comint-preoutput-filter-functions
         (lambda (output)
           (replace-regexp-in-string "\033\\[[0-9]+[GK]" "" output)))))

\033 is the escape character it prints as ^[.

tangxinfa

Just add one line in your .emacs:

(setenv "NODE_NO_READLINE" "1")

Answer come from this post: Node.js prompt '>' can not show in eshell

Not sure how recent, but now one can download and use the nodejs-repl.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!