My Emacs Configuration

Source: Internet
Author: User
Tags git clone

The following items are saved in the ~/.emacs file. I use the system is Ubuntu14.04. My principle is to use what to configure, not to configure the "possible use of" things.

How to install code completion
1, create a good directory
My directory is this: Create the plugins/directory under the. emacs.d/directory.
2. Download the plugin you want to use
Enter the. emacs.d/plugins/directory and download the following plugins in turn. If you do not have the Git tool installed, please install it (sudo apt-get install git) first.

git clone https://github.com/auto-complete/auto-completegit clone https://github.com/joaotavora/yasnippetgit clone https://github.com/auto-complete/popup-el

The above files are very small and download quickly.
3. Copy the Popup.el file from the directory Popup-el generated after download to the Auto-complete folder (now still in the. emacs.d/plugins/directory).

cp popup-el/popup.el auto-complete/

4. Return to the home folder, edit the. emacs file to configure, and add the following configuration:

;;---------------------代码补全---------------------;;配置auto-complete(add-to-list ‘load-path "~/.emacs.d/plugins/auto-complete/")(require ‘auto-complete-config)(add-to-list ‘ac-dictionary-directories         "~/.emacs.d/plugins/auto-complete/dict/")(ac-config-default);;配置yasnippet(add-to-list ‘load-path "~/.emacs.d/plugins/yasnippet")(require ‘yasnippet)(yas/global-mode 1)

5, save, exit, re-enter Emacs, you can see the effect.

Thanks again for writing plugin predecessors!

The final. Emacs configuration file reads as follows:

;; ---------------------interface settings---------------------;; Turn off the splash screen (setq inhibit-startup-message 1); Hide the toolbar (tool-bar-mode 0);; Display line number (Global-linum-mode 1);; Set line number format (setq Linum-format "%d");; Number of columns displayed (setq column-number-mode 1);; Current row highlighting (Global-hl-line-mode 1);; Set the width of the window (the system I'm using, by default, this width can be just one row to display 80 columns.) ) (Set-frame-width (Selected-frame) 84);; --------------------------------------------------;; ---------------------function setting---------------------;; The URDF file is processed as an XML file pattern (setq auto-mode-alist (cons ' (\\.urdf$) nxml-mode));; Xacro formatted file as XML file pattern processing (setq auto-mode-alist (cons ' (\\.xacro$) nxml-mode)); Launch formatted file as XML file pattern processing (setq auto-mode-alist (cons ' (\\.launch$) nxml-mode)); Auto Indent (Global-set-key (kbd "RET") ' newline-and-indent ');; --------------------------------------------------;; ---------------------code completion---------------------;; Configure Auto-complete (add-to-list ' Load-path "~/.emacs.d/plugins/auto-complete/") (Require ' auto-complete-config) ( Add-to-list ' Ac-dictionary-directories         "~/.emacs.d/plugins/auto-complete/dict/") (ac-config-default);; Configuration Yasnippet (add-to-list ' Load-path "~/.emacs.d/plugins/yasnippet") (Require ' Yasnippet) (Yas/global-mode 1); --------------------------------------------------

My emacs Configuration

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.