macos - Mac OS X 上的 .emacs 文件在哪里

标签 macos emacs

所以我试图将 google go 模块添加到我的 .emacs 文件中,这样当我使用 emacs 编辑我的 .go 文件时,它将具有适当的缩进和突出显示的单词。我在网上看了,似乎我需要将以下代码片段添加到我的 .emacs 文件中(我找不到!)

;; go mode
(setq load-path (cons "/usr/local/go/misc/emacs" load-path))
(require 'go-mode-load)

我已将 go-mode-load.el 和 go-mode.el 放在我的 .emacs.d/目录中我相信我仍然需要找到 .emacs 文件来添加上面列出的代码如果这有帮助,我正在运行 OS X。有人可以帮我完成这项工作吗?谢谢!

最佳答案

Emacs 手册告诉你:

This file, if it exists, specifies how to initialize Emacs for you.
Emacs looks for your init file using the filenames `~/.emacs', `~/.emacs.el',
or `~/.emacs.d/init.el'; you can choose to use any one of these three
names.  Here, `~/' stands for your home directory.

大多数人使用~/.emacs , 我认为。就做C-x C-f ~/.emacs如果您还没有,请创建它。

关于macos - Mac OS X 上的 .emacs 文件在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19524627/

相关文章:

c++ - 奇怪的语义错误

ios - 如何发布依赖于关系的自定义核心数据属性的通知?

c++ - 从第三个应用程序获取浏览器 URL

swift - Mac 中的 NSTableview reloadDataForRowIndexes 听起来

java - Mac OS Java 7 小程序+智能卡问题

c++ - CFStringCompareWithOptions 的奇怪行为

emacs 编辑 Rnw 在突出显示 R block 时保持区域突出显示

emacs - 如何突出显示超过 80 个字符的代码部分?

emacs - dired-omit-toggle 在 Emacs 23.2 中在哪里消失了?

emacs - EMACS 类 ajax 命令助手?