emacs cedet
用emacs写c或者c++代码用的插件的配置。功能是能够代码补齐。
(require 'package)
(package-initialize)
(add-to-list'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(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.
'(package-selected-packages (quote (highlight-symbol ggtags auto-complete))))
(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.
)
(require 'auto-complete-config)
(ac-config-default)
(setq make-backup-files nil)
(require 'highlight-symbol)
(global-set-key [(control f3)] 'highlight-symbol)
(global-set-key [f3] 'highlight-symbol-next)
(global-set-key [(shift f3)] 'highlight-symbol-prev)
(global-set-key [(meta f3)] 'highlight-symbol-query-replace)
(require 'cedet)
(semantic-mode 1)
(custom-set-variables
'(semantic-default-submodes (quote (global-semantic-decoration-mode global-semantic-idle-completions-mode
global-semantic-idle-scheduler-mode global-semanticdb-minor-mode
global-semantic-idle-summary-mode global-semantic-mru-bookmark-mode)))
'(semantic-idle-scheduler-idle-time 3))
;; smart complitions
(require 'semantic/ia)
(require 'semantic/bovine/gcc)
(setq-mode-local c-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
;;;; TAGS Menu
(defun my-semantic-hook ()
(imenu-add-to-menubar "TAGS"))
(add-hook 'semantic-init-hooks 'my-semantic-hook)
;;;; Semantic DataBase存储位置
(setq semanticdb-default-save-directory
(expand-file-name "~/.emacs.d/semanticdb"))
(require 'semantic/db-global)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)
;; 使用 gnu global 的TAGS。
(require 'semantic/db-global)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)
;;;; 缩进或者补齐
;;; hippie-try-expand settings
;;(setq hippie-expand-try-functions-list
;;'(
;;;;yas/hippie-try-expand
;;semantic-ia-complete-symbol
;;try-expand-dabbrev
;;try-expand-dabbrev-visible
;;try-expand-dabbrev-all-buffers
;;try-expand-dabbrev-from-kill
;;try-complete-file-name-partially
;;try-complete-file-name
;;try-expand-all-abbrevs))
;;(defun indent-or-complete ()
;;"Complete if point is at end of a word, otherwise indent line."
;;(interactive)
;;(if (looking-at "\\>")
;;(hippie-expand nil)
;;(indent-for-tab-command)
;;))
(defun yyc/indent-key-setup ()
"Set tab as key for indent-or-complete"
;;(local-set-key [(tab)] 'indent-or-complete)
)
;;;; C-mode-hooks .
(defun yyc/c-mode-keys ()
"description"
;; Semantic functions.
(semantic-default-c-setup)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-cb" 'semantic-mrub-switch-tags)
(local-set-key "\C-cR" 'semantic-symref)
(local-set-key "\C-cj" 'semantic-ia-fast-jump)
(local-set-key "\C-cp" 'semantic-ia-show-summary)
(local-set-key "\C-cl" 'semantic-ia-show-doc)
(local-set-key "\C-cr" 'semantic-symref-symbol)
(local-set-key "\C-c/" 'semantic-ia-complete-symbol)
(local-set-key [(control return)] 'semantic-ia-complete-symbol)
(local-set-key "." 'semantic-complete-self-insert)
(local-set-key ">" 'semantic-complete-self-insert)
;; Indent or complete
;;(local-set-key [(tab)] 'indent-or-complete)
)
(add-hook 'c-mode-common-hook 'yyc/c-mode-keys)
c/c++ 学习互助QQ群:877684253

本人微信:xiaoshitou5854
emacs cedet的更多相关文章
- C 语言资源大全中文版
C 语言资源大全中文版 我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列的资源整理.awesome-c 是 koz.ross 发起维护的 C 语言资源列表,内容包括了: ...
- emacs工程管理,cedet ede插件自动构建Make,Automake
鉴于自己一直都是在做客户端开发方面的工作,服务端很多知识都随着时间淡忘了,最近有一个计划,用一些时间补一下基础.所以早上很早就起床,花了一点时间大致浏览了一下BSD socket的相关API,然后用G ...
- 为了树莓派IIraspberrypi安装emacs+ecb+cedet+session+color-theme+cscope+linum
类似这篇文章写的不多,为了避免以后大家转来转去而忽略了写文章的时间,这些特别加上是2014年6月28日,省的对不上一些软件的版本号(下文中有些"最新"的说法就相应这个时间).假设转 ...
- Emacs-24.1 + ECB-2.40 + cscope-15.7a + cedet 无root权限指定目录安装与配置
emacs等安装在-/INSTALL目录下,在-下新建一个INSTALL目录. 1. emacs-24.1.tar.gz ecb-2.40.tar.gz cscope-15.7a.tar.bz2下载到 ...
- Emacs 24.3 配置JDEE(http://blog.csdn.net/csfreebird/article/details/19033939)
最近要重回Java编程,所以打算在最新版本的Emacs 24.3上配置JDEE,听说会有些问题,特此记录安装过程. Emacs 24.3内置了CEDET, 版本是2.0, 这是一个让人困惑的事情,因为 ...
- emacs配置详解及C/C++IDE全功能配置演示(附配置文件)
我的emacs插件下载地址: http://pan.baidu.com/share/link?shareid=4196458904&uk=3708780105 说明: 1.为什么使用emacs ...
- Emacs配置erlang开发环境(.emacs 文件)
以前都是用sublime写erlang代码,好处不多说,主要是觉得一点不好用,不能实现函数跳转,及其不方便,尤其是代码一多,头疼.后来折腾过IntelliJ,下了个收费$0.00的版本,风格还是挺稀饭 ...
- emacs 配置
个人的Emacs配置,环境是archlinux,参考了不少网上资料,因为太多,就不一一列举了,在这里感谢那些作者的辛苦经验劳动. (custom-set-variables ;; custom-set ...
- 当python模式遇见cedet
TAG: emacs, python, cedet, semantic, ctags DATE: 2013-08-20 我用Emacs 24写python程序. 发现屏幕不时有些闪动,MiniBuff ...
随机推荐
- 面向对象程序设计(JAVA) 第10周学习指导及要求
2019面向对象程序设计(Java)第10周学习指导及要求 (2019.11.1-2019.11.4) 学习目标 1.掌握java异常处理技术: 2.了解断言的用法: 3.了解日志的用途: 4.掌 ...
- 肖哥讲jquery:
jquery 是一个模块 一个库 js封装的一个库 导入jq <script src="jquery.js"></script> <script ...
- vue better-scroll
better-scroll在vue项目中的使用 2017年12月21日 18:01:09 阅读数:411 1.准备工作 在项目中安装better-scroll: npm install --save ...
- Class的使用,构造方法,实例属性和实例方法,静态属性和静态方法,this和super关键字,类的继承
s6新增了一种定义对象实例的方法,Class(类)这个概念,作为对象的模板.class可以看作只是一个语法糖,通过class关键字,可以定义类.让对象原型的写法更加清晰.更像面向对象编程的语法. 一. ...
- MySQL实战45讲学习笔记:第二十七讲
一.一主多从的切换正确性 在前面的第24.25和26篇文章中,我和你介绍了 MySQL 主备复制的基础结构,但这些都是一主一备的结构. 大多数的互联网应用场景都是读多写少,因此你负责的业务,在发展过程 ...
- React服务器端渲染框架next.js项目实战及部署上下文context问题解决办法
在前段时间折腾过搭建react服务器端项目架构,点击这里了解下,正好最近有个重构PC网站的需求,考虑SEO等因素.在做技术选型的时候决定采用nextjs.项目开发过程中,nextjs的体验非常棒,个人 ...
- ItelliJ Idea 2019提交TFVC变更,系统提示Validation must be performed before checking in
问题描述 全新安装的Idea 2019,从Azure DevOps Server 2019 (原名TFS)的TFVC代码库下载文件,正常. 修改代码后,签入,系统提示"Validation ...
- tf.slice()
原文连接:https://www.jianshu.com/p/71e6ef6c121b tf.slice()到底要怎么切呢?下面通过列子来看看 方程的signature是这样的: def slice( ...
- IL 语法分析
Managed Heap: GC auto manage. One process, One heap. Call Stack: Runtime auto manage, every time whe ...
- 架构设计系列-前端模式的后端(BFF)翻译PhilCalçado
本文翻译自PhilCalçado的官网:https://philcalcado.com/2015/09/18/the_back_end_for_front_end_pattern_bff.html 对 ...