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 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 the software version (some of the "latest"and that's the time to say it.). If the forwarding 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 the above, programming efficiency is indeed high, but it took a lot of time. At the end of 2010, when you gave up Emacs, you chose all the Ides that support Emacs key, such as Eclipse,netbean,vs,in the final analysis, the efficiency of Emacs programming is the most importantin Emacs Key, and directly with Emacs, the version of the various plug-ins conflict resolution and configuration to spend a lot of time developers, and the use of modern Ides, can not only enjoy the fast Emacs key, but also 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 pass the network to the server) app, via my host SSHConnect Raspberry Pi II, andgiven the effectiveness, the Raspberrypi interface on Raspberry Pi II has not been used, so it can only be developed under the console, so it has to be re-picked up by the Emacs IDE. To tell the truth, do more than 12 years of various technology applications, is just beginning to learn embedded development, life, learning more than:
Spent most of the day, finally after dealing with various versions of the problem, the development environment to build up, the following simple record.
First, Emacs's config file is in ~/.emacs, and all plugins are in ~/.emacs.d/lisp/.
The entire environment uses the software version.
  • Emacs 23.4.1,raspberrypi comes with it.
  • cscope-15.7a , Raspberrypi, but not cscope-indexer and Xcscope.el, strange, probably just raspberrypi.
  • cscope-15.8a, download, unzip only, and then copy the Cscope-indexer to/usr/bin, and copy the Xcsope.el to ~/.emacs.d/lisp/.
  • ecb-2.40, download, this has no choice, unzip and put into the ~/.EMACS.D/LISP/ECB.
  • cedet-1.0.1, download, do not use 1.1, avoid also to modify the ECB version check, ? unzip and put to ~/.emacs.d/lisp/cedet the.
  • linum.el, download the latest, put to ~/.emacs.d/lisp/.
  • session.el, Download the latest, put to ~/.emacs.d/lisp/.
  • ? Color-theme.el, Download the latest, put in ~/.emacs.d/lisp/. ?
  • session-2.3.a, download, unzip to the ~/.emacs.d/lisp/.
? Then compile all of the above *.el into *.ELC, using Emacs until why do this, where 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 was compiled, ELC, the speed of the Raspberry Pi is still very slow, but also reasonable.
can get it done, and then it's bad. Emacs This file is configured. My development needs are C/C + +, the main focus. The following is a detailed configuration:;; 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.
 )

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.