go配置emacs编辑器代码自动提示的”.emacs“文件在哪里?

ameyume
博客专家认证
2019-07-29 11:13:44
ubutnu设置emacs编辑器go代码自动提示,其中有一步是
“Add these lines to your .emacs”,那这个".emacs"在哪里呢?下载的emacs-26.2目录下没有这个文件,ubutnu用户根目录下也没有这个隐藏文件。

https://github.com/mdempsky/gocode
Emacs setup
In order to install emacs script, you need to fulfill the following steps:

Install auto-complete-mode

Copy emacs/go-autocomplete.el file from the gocode source distribution to a directory which is in your 'load-path' in emacs.

Add these lines to your .emacs:

(require 'go-autocomplete)
(require 'auto-complete-config)
(ac-config-default)
...全文
135 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qybao 2019-07-29
  • 打赏
  • 举报
回复
类似于其他IDE一样,需要下载一些包
你可以参考一下的链接
https://studygolang.com/articles/6126
ameyume 2019-07-29
  • 打赏
  • 举报
回复
下面的是提示helloworld目录下没有flymake_hello.go,在.emacs中注释掉flymake,不使用就不会保存了。
ameyume 2019-07-29
  • 打赏
  • 举报
回复
在根目录下自己建立了一个.emacs文件,内容如下: ~$ cat ~/.emacs (add-to-list 'load-path "~/go/go-mode.el") (require 'go-mode) (add-to-list 'load-path "~/go/golang/src/github.com/dougm/goflymake") (require 'go-flymake) (add-to-list 'load-path "~/.emacs.d") (require 'auto-complete-config) (ac-config-default) (require 'go-autocomplete) (require 'auto-complete-config) (ac-config-default) (setq ac-ignore-case t) 并且在根目录下建立了一个.emacs.d文件夹,包含的文件有: :~/.emacs.d$ ls ac-dict auto-complete.el auto-save-list popup.el auto-complete-config.el auto-complete-pkg.el go-autocomplete.el 启动emacs时,提示如下: 并且,在emacs中打开go源码文件时提示: 不过,编辑代码的确是有自动提示。

2,190

社区成员

发帖
与我相关
我的任务
社区描述
go语言学习与交流版
社区管理员
  • go语言社区
  • Freeman Z
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧