inf-ruby eval当前线

时间:2017-01-27 23:09:03

标签: ruby emacs elisp

inf-ruby支持ruby-send-region,它与marker-fu结合可以评估单行,但我更喜欢使用像ruby-send-line这样的函数来评估光标的当前行按键。这存在吗?如果没有,我该如何开始制作呢?

1 个答案:

答案 0 :(得分:1)

以下似乎运作良好:

(defun ruby-send-line ()
  "Send the current line to the inferior Ruby process."
  (interactive)
  (ruby-send-region (point-at-bol) (point-at-eol)))
相关问题