为了树莓派IIraspberrypi安装emacs+ecb+cedet+session+color-theme+cscope+linum
key上。而直接用Emacs的话,各种插件的版本号冲突解决和配置要花开发者不少时间,而使用现代IDE。既能享受emacs key的快捷。又能省去Emacs配置和麻烦。何乐而不为。
- Emacs 23.4.1。raspberrypi自带。
- cscope-15.7a,raspberrypi自带,可是没有cscope-indexer和xcscope.el,奇怪,可能仅仅是raspberrypi是这样。
- cscope-15.8a,下载。仅仅解压。然后把cscope-indexer加上运行权限然后拷贝到/usr/bin中。把xcsope.el拷贝到~/.emacs.d/lisp/。
- ecb-2.40。下载,这个没得选,解压后放到~/.emacs.d/lisp/ecb中。
- cedet-1.0.1。下载,不要用1.1,避免了还要改动ecb的版本号检查,解压后放到~/.emacs.d/lisp/cedet中。
- linum.el,下载最新的,放到~/.emacs.d/lisp/。
- session.el。下载最新的,放到~/.emacs.d/lisp/。
- color-theme.el,下载最新的。放到~/.emacs.d/lisp/。
- session-2.3.a。下载,解压到~/.emacs.d/lisp/。
-f batch-byte-compile *.el。但即使编译了成了.elc。在树莓派上的速度还是非常慢。只是也合理。
以下是具体的配置:
(setq default-major-mode 'text-mode)
(global-font-lock-mode t)
(auto-image-file-mode t)
(transient-mark-mode t)
(show-paren-mode t)
(column-number-mode t)
(tool-bar-mode nil)
(setq-default make-backup-files nil)
(mouse-avoidance-mode 'animate)
;; Autorevert stuff
(autoload 'auto-revert-mode "autorevert" nil t)
(autoload 'turn-on-auto-revert-mode "autorevert" nil nil)
(autoload 'global-auto-revert-mode "autorevert" nil t)
;; Load session
(require 'session)
;; Load linum
(require 'linum)
;; load color-theme
(require 'color-theme)
;; Load xcscope
;; Load cedet
(load-file "~/.emacs.d/lisp/cedet/common/cedet.elc")
(global-ede-mode 1)
(ede-cpp-root-project "sensor_worker" :file "~/workspace/c/sensor_worker/Makefile")
(semantic-load-enable-code-helpers)
(global-srecode-minor-mode 1)
(defun my-indent-or-complete ()
(interactive)
(if (looking-at "//>")
(hippie-expand nil)
(indent-for-tab-command)
)
(setq hippie-expand-try-functions-list
'(
senator-try-expand-semantic
try-expand-dabbrev
try-expand-dabbrev-visible
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-expand-list
try-expand-list-all-buffers
try-expand-line
try-expand-line-all-buffers
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
)
;; C/C++ setting
(require 'cc-mode)
(setq c-basic-offset 4)
(c-set-offset 'inline-open 0)
(c-set-offset 'friend '-)
(defun my-c-mode-common-hook()
(setq tab-width 4)
(setq indent-tabs-mode nil)
(setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80))
(define-key c-mode-base-map [(tab)] 'my-indent-or-complete)
(define-key c-mode-base-map [(ctrl tab)] 'semantic-ia-complete-symbol-menu)
(define-key c-mode-base-map [(f9)] 'compile)
(setq c-macro-shrink-window-flag t)
(setq c-macro-preprocessor "cpp")
(setq c-macro-cppflags " ")
(setq c-macro-prompt-flag t)
(setq hs-minor-mode t)
(setq abbrev-mode t)
(c-set-style "user")
(hl-line-mode t)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
(setq auto-mode-alist (cons '("//.h$" . c++-mode) auto-mode-alist))
;; Load ecb
(add-to-list 'load-path "~/.emacs.d/lisp/ecb")
(require 'ecb)
(global-set-key [f12] 'ecb-activate)
(global-set-key [C-f12] 'ecb-deactivate)
(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.
'(ecb-options-version "2.40"))
(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.
)
版权声明:本文博客原创文章,博客,未经同意,不得转载。
为了树莓派IIraspberrypi安装emacs+ecb+cedet+session+color-theme+cscope+linum的更多相关文章
- CentOS 6.7 中安装Emacs 24.5
Emacs 版本:http://mirror.bjtu.edu.cn/gnu/emacs/emacs-24.5.tar.gz CentOS 内核版本:2.6.32-573.el6.x86_64 参考资 ...
- 使用PPA在ubuntu上安装emacs
使用PPA(Personal Package Archive)在ubuntu上安装emacs 1添加 PPA 到 apt repository 中: $ sudo add-apt-reposito ...
- Windows下安装Emacs+Sbcl+Slime
前言 其实网上已经有很多类似的文章了,我也是按照上面的来做.在做的过程中会遇到几个很坑的地方,我自己也是折腾了好久才弄好.所以现在写出来希望能对大家有所帮助. 正文 下载和安装Emacs http:/ ...
- 树莓派centos安装的基本配置
萌新再发一帖,这篇文章呢主要是为大家在树莓派上安装centos以后提供一个问题的解决方案. 首先我呢觉得好奇就在某宝上花了两百来块钱买了一套树莓派,很多人喜欢在树莓派上安装Debian,我呢更青睐用R ...
- 安装Emacs并设置racket环境
最近在阅读sicp这本书,书中的代码是使用scheme实现的.之前阅读的时候是使用Dr.Racket来完成写练习的,可我觉得与其这样,不如一步到位,使用emacs+lisp解释器来的比较快. 安装em ...
- GO语言.树莓派.环境安装和测试
Go是Google开发的一种静态强类型.编译型.并发型,并具有垃圾回收功能的编程语言.为了方便搜索和识别,有时会将其称为Golang 记录一下如何在树莓派上安装语言环境 第一步: 下载安装包 http ...
- linux下快速安装emacs方法
背景 在公司工作的时候经常需要在很多服务器之间切换,而公司的服务器上一般都没emacs,因此总结一下快速安装emacs的方法. 最简单的是直接使用yum安装,但是有两个问题,一个是有的生产服务器直接没 ...
- 树莓派3B安装远程
步骤1:树莓派3安装 RDP SERVER 及VNC SERVER sudo apt-get install -y tightvncserver sudo vncserver 最后才知道一定要加上VN ...
- 在(Raspberry Pi)树莓派上安装NodeJS
本文主讲如何在树莓派3B上安装node.js 环境描述1. 树莓派安装了`2016-11-25-raspbian-jessie-lite`(PS:在此版本的镜像中,默认禁用了ssh,在烧录好镜像之后, ...
随机推荐
- stm32智能小车之路之小车启动
首先.安装完小车后最激动的还是想让他跑动,那么就開始吧.写个简单的程序測试下电机是否正常.打开keil软件新建一个project,详细简历keilproject不会的请百度.或者call ...
- SQL SERVER递归查询
SQL SERVER 进行递归查询 有如下数据表
- 使用内容提供者和xml备份联系人
1.通过内容提供者获取联系人信息 package com.ithaimazyh.readcontact; import java.util.ArrayList; import java.util.Li ...
- webview 加载某些网页失败的处理办法(第七条)
1.添加权限:AndroidManifest.xml中必须使用许可"android.permission.INTERNET",否则会出Web page not available错 ...
- 【虚拟化实战】容灾设计之一VR vs SRM
作者:范军 (Frank Fan) 新浪微博:@frankfan7 从本文开始,我们将介绍一系列的关于容灾的解决方案.先探讨应用的场景,然后再深入介绍技术架构. 情景一: 某小型公司的虚拟化环境中,在 ...
- USACO inflate
全然背包,转化为0/1背包 dp[i, j] = max(dp[i-1, j], dp[i, j - minutes[i]] + points[i]) /* ID:kevin_s1 PROG:infl ...
- 用xerces-c来进行xml schema校验
在xerces-c的官方站点上有文章指引说明是怎样进行xml schema校验. http://xerces.apache.org/xerces-c/schema-3.html 给出的样例代码: // ...
- sql: update from
sql server提供了update的from 子句,可以将要更新的表与其它的数据源连接起来.虽然只能对一个表进行更新,但是通过将要更新的表与其它的数据源连接起来,就可以在update的表达式 中引 ...
- NLP | 自然语言处理 - 标注问题与隐马尔科夫模型(Tagging Problems, and Hidden Markov Models)
什么是标注? 在自然语言处理中有一个常见的任务,即标注.常见的有:1)词性标注(Part-Of-Speech Tagging),将句子中的每一个词标注词性,比如名词.动词等:2)实体标注(Name E ...
- Vanya and Lanterns
Description Vanya walks late at night along a straight street of length l, lit by n lanterns. Consid ...