The IDE environment configuration for the Emacs editor Python and Perl

Source: Internet
Author: User
Tags virtualenv



Link: http://pan.baidu.com/s/1c0fjY3e Password: j8pe






The files in the network disk are my profile, and the Lisp source package used. After downloading, it can be extracted to the user's home directory.






The contents of my Emacs configuration file are:


# cat ~ / .emacs
;; Disable startup splash screen
(setq inhibit-startup-message t)

;; default tab is 4 widths
(setq-default tab-width 4)

(setq fill-column 70)

;; display setting
(display-time-mode t)
(column-number-mode t)

;; highlight selected block
(transient-mark-mode t)

;; Support external copy and paste
(setq x-select-enable-clipboard t)

;; show parenthesis matching
(show-paren-mode t)
(setq show-paren-style ‘parentheses)

;; Multi-window settings
;; (require ‘window-numbering)
;; (window-numbering-mode 1)

;; set display bottom bar (time, row and column number), font
; (setq display-time-day-and-date t)
(display-time-mode 1)
(setq display-time-24hr-format t)
(setq display-time-use-mail-icon t) ;; mail settings icon
(setq frame-title-format "[email protected]% b")

;; GDB settings, multi-window GDB
(setq gdb-many-windows t)

;; syntax highlighting
(global-font-lock-mode t)

;; Set ‘y’ or ‘n’ instead of ‘yes’ or ‘no’
(fset ‘yes-or-no-p‘ y-or-n-p)

;;;; yasnippet setting
(add-to-list ‘load-path" ~ / .emacs.d / elpa / yasnippet ")
(require ‘yasnippet)
(yas / global-mode 1)

;; Turn off autosave
(setq auto-save-default nil)
(setq make-backup-files nil)

;; These sentences are my global configuration to avoid multilingual confusion.
(set-buffer-file-coding-system ‘utf-8)
(set default-buffer-file-coding-system ‘utf-8)
(set-terminal-coding-system ‘utf-8)
(set-language-environment ‘UTF-8)
(set-locale-environment "UTF-8")

;; set cursor and pointer color
(set-cursor-color "red")
(set-mouse-color "goldenrod")

;; set the color of the selected area
(set-face-background ‘region" yellow ")

;; add a blank line at the end of the file
(setq require-final-newline t)
(setq track-eol t)

;; Perl development environment PDE settings
(add-to-list ‘load-path" ~ / .emacs.d / elpa / pde / lisp ")
(load "pde-load")

;; ===================================================
;; My custom function to open my GTD file and bind it to a shortcut
(defun gtd ()
  (interactive)
  (find-file "~ / Desktop / iGTD / iGTD.org")
  )
(global-set-key "\ C-cx" ‘gtd)

;;; auto-complete configuration
(add-to-list ‘load-path" ~ / .emacs.d / elpa / auto-complete ")
(require ‘auto-complete)

;;; Python autocompletion configuration
(add-to-list ‘load-path" ~ / .emacs.d / elpa / python-environment ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / jedi ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / jedi-core ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / virtualenv ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / ctable ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / concurrent ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / deferred ")
(add-to-list ‘load-path" ~ / .emacs.d / elpa / epc ")
(require ‘popup)
(require ‘ctable)
(require ‘concurrent)
(require ‘epc)
(add-hook ‘python-mode-hook‘ jedi: setup)
(autoload ‘jedi: setup" jedi "nil t)
(setq jedi: complete-on-dot t)
(add-to-list ‘load-path" ~ / .emacs.d / elpa / popup ")





The Lisp directory structure is:


# tree -L 2 -d ~/.emacs.d
/root/.emacs.d
├── auto-save-list
├── elpa
│   ├── archives
│   ├── auto-complete
│   ├── concurrent
│   ├── ctable
│   ├── deferred
│   ├── epc
│   ├── gnupg
│   ├── jedi
│   ├── jedi-core
│   ├── pde
│   ├── popup
│   ├── python-environment
│   ├── virtualenv
│   └── yasnippet
├── eshell
└── pde
    ├── contrib
    ├── doc
    ├── templates
    ├── tools
    └── tree-widget

23 directories





With the above configuration, our programming environment for Perl and Python is well configured. With a good programming environment, the use of it makes people comfortable. Let's take a look at the editing effect and how it works:






The editing effect is:



650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/30/wKiom1Xeh0ajAZKhAAfmOyFB3Fo732.jpg "style=" float: none; "title=" Emacs-perl.png "alt=" Wkiom1xeh0ajazkhaafmoyfb3fo732.jpg "/>









650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/2C/wKioL1XeiV_jc3rIAAEPpCB_PDU168.jpg "style=" float: none; "title=" Emacs-python.png "alt=" Wkiol1xeiv_jc3riaaeppcb_pdu168.jpg "/>






Well, configure it and start to enjoy the fun of programming.



This article is from the "Tiandaochouqin" blog, make sure to keep this source http://lavenliu.blog.51cto.com/5060944/1688793



The IDE environment configuration for the Emacs editor Python and Perl


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.