Install Emacs+ecb+cedet+session+color-theme+cscope+linum for Raspberry Pi Iiraspberrypi

Source: Internet
Author: User
Tags autoload

similar to this articleThe article does not write much, in order to avoid the later people wandering around and neglected to write the time of the article, these special Plus is June 28, 2014, the province is not on some software version number (some of the "latest"The argument is correspondingly this time). Suppose the forward time can add my old gu link is better:)
or in 2008-2010 years, compared to the powder Emacs, and then spent a lot of time on top, programming efficiency is really high, but it took a lot of time. At the end of 2010, I gave up Emacs. Instead, use all the Ides that support Emacs key, such as Eclipse,netbean,vs,The most important thing about Emacs's programming efficiency ison the Emacs key. and directly with Emacs, the various plug-in version number conflict resolution and configuration to spend a lot of time developers, and the use of modern Ides. Enjoy the quick access to Emacs key. Also can save Emacs configuration and trouble. Why not。


but recently in the Raspberry Pi II developed some embedded (mainly to read a variety of sensors, and then through the network to the server ) application. Connect the Raspberry Pi II via my host SSH , and consider the performance. Without using the Raspberrypi interface on Raspberry Pi II, you can only develop under the console, so you have to pick up the IDE again for Emacs. To be honest, it has been used for more than 12 years in various technologies. Recently, we have just started to learn embedded development, life and learning more than:)
Spent most of the day, finally in dealing with the various version number problems, the development environment has been set up, the following simple record.
First of all. Emacs configuration file in ~/.emacs, all plugins in ~/.emacs.d/lisp/.


The version number of the software used throughout the environment.

  • Emacs 23.4.1. Raspberrypi comes with.

  • cscope-15.7a , Raspberrypi, but there is no cscope-indexer and Xcscope.el, strange, perhaps just Raspberrypi is so.

  • cscope-15.8a, download. Just unzip. Then add the cscope-indexer and then copy it to the/usr/bin. Copy the Xcsope.el to the ~/.emacs.d/lisp/.

  • ecb-2.40. Download, this has no choice, decompression and put into the ~/.EMACS.D/LISP/ECB.
  • cedet-1.0.1. Download, do not use 1.1, avoid to change the ECB version number check,? unzip and put to ~/.emacs.d/lisp/cedet the.
  • linum.el, download the latest, put in ~/.emacs.d/lisp/.

    ?

  • session.el. Download the latest, put to ~/.emacs.d/lisp/.
  • ? Color-theme.el, Download the latest. put it on the ~/.emacs.d/lisp/.

    ?

  • session-2.3.a. Download, unzip to ~/.emacs.d/lisp/.
? Then compile all of the above *.el into *.ELC, using Emacs until why do this, in which the ECB and Cedet are compiled separately with make. Others are compiled with Emacs's commands:? Emacs-batch-f batch-byte-compile *.el? But even if it's compiled into. Elc. The speed on the Raspberry Pi is still very slow. Just also reasonable.


Can get it done, and then it's bad. Emacs This file is configured. My development should be C/C + +, the main focus.

The following are the specific configurations:;; Nomral setting
(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)
(setq x-select-enable-clipboard t)
;; 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)
(Global-auto-revert-mode 1)
(add-to-list ' Load-path "~/.emacs.d/lisp")
;; Load Session
(require ' session)
(Add-hook ' After-init-hook ' session-initialize)
;; Load Linum
(Require ' Linum)
(Global-linum-mode t)(setq linum-format "%4d \u2502")

;; load Color-theme
(Require ' Color-theme)
(Color-theme-hober)
;; Load Xcscope
(Require ' 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)
(Global-set-key [(F5)] ' Speedbar)
(Defun my-indent-or-complete ()
(Interactive)
(if (looking-at "//>")
(Hippie-expand nil)
(Indent-for-tab-command)
    )
  )
(autoload ' senator-try-expand-semantic "Senator")
(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 + + setting
(Require ' Cc-mode)
(setq c-basic-offset 4)
(C-set-offset ' Inline-open 0)
(C-set-offset ' friend '-)
(C-set-offset ' Substatement-open 0)
(Defun my-c-mode-common-hook ()
(setq tab-width 4)
(setq indent-tabs-mode nil)
(setq tab-stop-list ' (4 8)---------
(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)
(Add-hook ' C++-mode-common-hook ' My-c-mode-common-hook)
(setq auto-mode-alist (cons ' ("//.h$". C++-mode) auto-mode-alist))
(setq auto-mode-alist (cons ' ("//.cpp$". 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 and so is careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, the 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 and so is careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, the They won ' t work right.
 )

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Install Emacs+ecb+cedet+session+color-theme+cscope+linum for Raspberry Pi Iiraspberrypi

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.