我似乎不能为emacs启用go模式。C模式在没有分号的情况下不起作用。我发现最好的是JavaScript mode by Karl Landstrom,因为JavaScript也不需要分号。
发布于 2009-11-11 22:27:39
在Go发行版中尝试使用misc/emacs/go-mode.el
(web link)。
如果您使用的是Emacs 24 and marmalade repo,请使用M-x package-install <RET> go-mode
直接安装。
发布于 2012-07-12 07:09:20
如果你的Go安装到/usr/local/go
,那么在你的.emacs
文件中添加以下代码。
;; go mode
(setq load-path (cons "/usr/local/go/misc/emacs" load-path))
(require 'go-mode-load)
发布于 2013-09-09 20:12:48
请阅读由官方go-mode
的作者Dominik Honnef编写的Writing Go in Emacs和its follow-up。
在那里,他解释了go-mode
的故事和安装方法,如何从Emacs内部读取Go文档,如何在Emacs中管理Go文件的导入语句,如何设置自动完成,即时语法检查,代码片段,以及在Emacs中开发Go的许多其他非常有用的功能。
https://stackoverflow.com/questions/1715464
复制相似问题