题
对于那些还没有使用DrScheme,窗口分为两个部分:一部分是一个文件正在编辑和其他互动壳。当我运行一个文件,它载入的交互式的环境,因此我可以援引的功能,我一定义等。交互式的环境中仍然具有的所有特征的文本编辑器(法突出显示,自动完成,等等。)
因此,是否有一个IDE红宝石,不仅是执行脚本我做的,但将其载入irb相反,所有文本编辑器好吃的东西?
解决方案
这个确切的请求(甚至达到一个事实,博士方案动机的话)是什么终于推我了解Emacs。
这是我做了什么安装Windows Vista下:
下载Emacs从 http://ftp.gnu.org/gnu/windows/emacs/emacs-22.3-bin-i386.zip
解它的目录你的选择
后解压它创建一个 包括 目录中的任何你想和复制有两个 红宝石的模式。el 和 红宝石-inf。el (这些都与红宝石分布在misc directory并且还可以下载下来 红宝石的来源
你的修改 .emacs 告诉它在哪里可以找到你的包括和使用它们
; directory to put various el files into (add-to-list 'load-path "C:/emacs-22.3/includes") ;(1)modify .emacs to use ruby-mode (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files" t) (setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)) auto-mode-alist)) (setq interpreter-mode-alist (append '(("ruby" . ruby-mode)) interpreter-mode-alist)) ;(2)set to load inf-ruby and set inf-ruby key definition in ruby-mode. (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process") (autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode") (add-hook 'ruby-mode-hook '(lambda () (inf-ruby-keys) ))
(可选)我还安装了 模式编译。el 从 http://perso.tls.cena.fr/boubaker/distrib/mode-compile.el 并作出相应编辑。emacs
; Install mode-compile (autoload 'mode-compile "mode-compile" "Compile current buffer based on the major mode" t) (global-set-key "C-cc" 'mode-compile) (autoload 'mode-compile-kill "mode-compile" "Kill compilation launched by `mode-compile'" t) (global-set-key "C-ck" 'mode-compile-kill)
与这些变化Emacs将自动识别一个。rb文件作为红宝石和做法突出强调。然后用弦\C-c\C-s(控制-c,释放,然后控制-s)移民和难民委员会将开始在下面的方框中你的文件,并且可以使用所有的钥匙定义inf-红宝石:(\M元键Windows装置Alt)
"\C-c\C-b" 'ruby-send-block
"\C-c\M-b" 'ruby-send-block-and-go
"\C-c\C-x" 'ruby-send-definition
"\C-c\M-x" 'ruby-send-definition-and-go
"\C-c\C-r" 'ruby-send-region
"\C-c\M-r" 'ruby-send-region-and-go
"\C-c\C-z" 'switch-to-ruby
"\C-c\C-l" 'ruby-load-file
"\C-c\C-s" 'run-ruby
如果你有没有可选步骤和安装方式编译,还可以使用\C-cc发送的电文件红宝石,而不是移民和难民委员会
其他提示
我还没有DrScheme工作还没有,但Netbeans的6.5包括一个全功能的IRB。你给它一个尝试?