为mac ruby​​开发设置.emacs文件 [英] Setting up .emacs file for mac ruby development

查看:114
本文介绍了为mac ruby​​开发设置.emacs文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



.emacs文件位于〜/ .emacs我添加了几个命令(许多从这个网站粘贴),没有一个似乎加载。任何建议?我不知道文件是否没有加载,或者我的命令语法错误。



我需要的是以下




  • 4空格缩进(自动输入也会很好)

  • 为.rb文件加载ruby模式



谢谢!

解决方案

c $ c>(警告加载.emacs)作为.emacs的第一行当您启动emacs它会在警告缓冲区中显示该消息?如果是这样,它至少开始加载该文件。



如果这不执行任何操作,请尝试使用emacs打开文件,并运行 Mx eval-buffer



此外,在启动时,消息缓冲区是否指示.emacs中的任何错误?这是.emacs不是最常见的原因生效。


I am having a difficult time loading ruby-mode in emacs on my mac.

The .emacs file is located at ~/.emacs I've added several commands to it (many pasted from this site) and none seem to get loaded. Any advise? I"m not sure if the file isn't loading or I have the command syntax wrong.

All I need is the following

  • 4 space indent (auto-intedent would be great as well)
  • ruby mode loaded for .rb files.

Thanks!

解决方案

Put the line (warn "Loading .emacs") as the first line of .emacs. When you start emacs does it show you that message in a warning buffer? If so, it at least started loading the file.

If this does nothing, try opening the file in emacs, and running M-x eval-buffer.

Also, at startup, does the Messages buffer indicate any errors in your .emacs? This is the most common reason for a .emacs not to take effect.

这篇关于为mac ruby​​开发设置.emacs文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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