首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在emacs中使用gcc代码辅助?

如何在emacs中使用gcc代码辅助?
EN

Stack Overflow用户
提问于 2014-07-29 21:53:52
回答 1查看 258关注 0票数 1

我已经从源码成功构建并安装了gccsense和gcc-code-assist。

我已验证它们是否已正确安装。

但是,对于c和c++文件,emacs的行为方式没有改变(仍然没有智能感知!)

我如何纠正这个问题?

我使用这些代码正确地构建和安装了gccsense和gcc- instructions -assist。

PS :在阅读了关于这个问题的更多信息后,我发现要测试一切都安装正确了,我们必须运行命令M-x gccsense-diagnose和一条消息“一切正常!”将出现在微型缓冲区中。

我尝试了上面的命令,但在一个新的缓冲区中得到以下错误消息,而不是消息“一切正常”:-

代码语言:javascript
复制
     Cannot obtain completions for std::string
     You may not use code-completion 

这是我的".emacs“`文件:-

代码语言:javascript
复制
        (add-to-list 'load-path "~/.emacs.d/")  
(load "gccsense.el") 
(load "auto-complete.el") 

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "black" :foreground "gainsboro" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 128 :width normal :foundry "unknown" :family "Ubuntu Mono")))))
(defun switch-fullscreen nil
  (interactive)
  (let* ((modes '(nil fullboth fullwidth fullheight))
         (cm (cdr (assoc 'fullscreen (frame-parameters) ) ) )
         (next (cadr (member cm modes) ) ) )
    (modify-frame-parameters
     (selected-frame)
     (list (cons 'fullscreen next)))))

(define-key global-map [f11] 'switch-fullscreen)

 ; (global-auto-complete-mode t) 
EN

回答 1

Stack Overflow用户

发布于 2014-07-29 23:49:03

是你干的吗?将以下代码写入到~/.emacs中

代码语言:javascript
复制
(require 'gccsense)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25017111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档