如何打开在IRB模式自动完成模式? [英] How to turn on the Autocomplete mode in irb mode?

查看:125
本文介绍了如何打开在IRB模式自动完成模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置自动完成编写Ruby程序时帮助我,但在IRB的窗口,它是关闭的。我怎么打开它,并保持这种方式在以后的Emacs启动?

I have configured AutoComplete to help me when writing Ruby programs, but in irb window, it is off. How do I turn it on and keep it that way in subsequent Emacs starts?

推荐答案

把你的配置是这样的:

 (defun my-inf-ruby-mode-hook ()
    (set (make-local-variable 'ac-auto-start) 2)
    (set (make-local-variable 'ac-auto-show-menu) t)
   )
 (add-hook 'inf-ruby-mode-hook 'my-inf-ruby-mode-hook)

和我想,你还需要安装 AC-源变量在这个钩子,所以它会使用红宝石字典...

And I think, that you'll also need to setup ac-sources variable in this hook, so it will use ruby dictionaries...

这篇关于如何打开在IRB模式自动完成模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆