Emacs. d, a python programmer's emacs configuration file

Source: Internet
Author: User
Tags function definition html indent regular expression git clone

Preface

More and more people use emacs as development tools. even skype, gmail, and Douban FM can use emacs. as a product development, many plug-ins are certainly used, and some shortcut keys are set to improve development efficiency. I used prelude for a long time and found the following problems:

For example, to enable python support, you need to remove the annotation like python in the prelude-modules.el.
I don't need to support so many languages or so many shortcut keys
Aotupair is too difficult to use
It is difficult to customize the number of indentations in scss/css mode, and to mix tabs and spaces.
After reading the source code, I found that it was actually very simple and rough.

I made a wheel. emacs. d, mainly for python and web development.

Project Directory structure

├ ── Cask; I use [cask] (https://github.com/cask/cask) for package management tools
── Auto-insert; use auto-insert to add a new elisp/python file to automatically add a template based on yasnippet
│ ── Elisp-auto-insert
│ ── Python-auto-insert
├ ── Custom; custom plug-in Directory. You can also put the program you wrote in and then require in init. el.
│ ├ ── Flycheck. el; customizes flycheck to enable it to automatically execute pep8 and flake8 when saving the python program. Otherwise, a new buffer is opened and printed.
│ └ ── Py-autopep8.el; I implemented the autopep8 plug-in, automatically process files according to the pep8 standard when saving
── Functions. el; related functions used
── Helper. el; I wrote a preview table similar to 'C-h B 'about the bound shortcut keys.
├ ── Hs-minor-mode-conf.el; python functions/class folding
── Init. el; main program started by emacs
├ ── Keys. el; Key-chord configuration, which is commented out by default, causes a lot of trouble due to repeated code in large pieces of paste code.
── Local-settings.el; local configuration of the local machine, such as user name, separate shortcuts, etc.
── Misc. el; some emacs configurations
├ ── Mode-mappings.el; pattern ING, for example, Cask will automatically use emacs-lisp-mode
├ ── Modeline. el; I have customized modeline and used nyan-mode and powerline, some hack with color added
── Osx. el; some independent configurations in Mac, customized for my hhkb
├ ── Smartparens-config.el; custom smartparens configuration
── Tmp
│ ── README. md
└ ── Xiaoming-theme.el; I wrote a theme myself, okay, I'm James'

List of used plug-ins

F-file-related database processing
S-database related to string processing
Ag-it is said that the emacs plug-in of the_silver_searcher, a text search tool faster than ack
Ht-hash-related database processing
Anzu-display the current matching text, preview the replacement effect and total number of matching plug-ins
Dash-common function set
Helm-facilitates searching for various file content, buffer switching, emacs command execution, etc.
Jedi-python code completion, quickly requiring function/module-defined plug-ins
Command line completion function of smex-M-x
Direx-display directory tree
Magit-git plugin
Slime-commonlisp interaction mode
Ac-js2-js2-mode support js function definition lookup
Rinari-dependency, which needs to be installed
Diff-hl-color the git state at the beginning of the line-only emacs for graphic interfaces is supported
Dired-k-use highlighted files/directories, sizes, and other information with different colors
Bind-key-the usage of the shortcut key bound to this project is based on this package, and the global-set-key is not used.
Css-mode-css-mode
Upgrade of js2-mode-js-mode
Web-mode-front-end development required, html indent, supports jump based on tag/element/attribute/block/dom, syntax highlighting, supports templates such as mako and jinja2
Git-blame-git-blame, separate version
Key-chord
Nyan-mode-always cute kitten
Plim-mode-edit the major-mode of plim
Powerline-provides a nice status bar
Sass-mode-edit sass
Scss-mode-edit scss
Sublimity-emacs on the graphic interface can narrow down the preview code-sublime-text has a similar plug-in
Undo-tree-visualize undo
Yaml-mode-edit yaml
Yasnippet-a magic template system that defines abbreviations and automatically expands them with the tab key (some automatic "blank question filling" mechanisms)
Drag-stuff-you can drag the entire code block
Helm-swoop-search keywords in the project and automatically jump to the corresponding file and corresponding line
Ibuffer-vc-supported version-empty ibuffer mode
Projectile-manage projects to quickly access any files in the project and support full-project keyword search
Coffee-mode-edit coffee
Python-mode-edit python
Smartparens-automatic matching of parentheses, which can be deleted by block and redirected by tag
Use-package-how to reference packages in this project
Crontab-mode-highlight crontab
Golden-ratio-golden split display current window
Ipython plug-in of helm-ipython-helm
Rainbow-mode-use the background color to indicate the color value in the code.
Ace-jump-mode-quickly move the cursor to the desired location
Expand-region-select by level block area
Css/scss plug-in for helm-css-scss-helm
Markdown-mode-edit markdown
Switch-window-visual switch window
Visual-regexp-visual regular expression matching
Gitconfig-mode-separate gitconfig-mode
Gitignore-mode-separate gitignore-mode
Helm-descbinds-highlight the default C-h B and separate it by group
Imenu-anywhere-similar to etag, you can directly jump to the corresponding tag
Multiple-cursors-edit multiple lines/lines at a time
Discover-my-major-tell you some descriptions of the current mode/shortcut key settings
Virtualenvwrapper-virtualenvwrapper
Gitattributes-mode-independent gitattributes-mode
Rainbow-delimiters-add different colors to pair symbols such as embedded parentheses
Idle-highlight-mode-the current keyword is automatically highlighted when the computer is not operated during the specified period of time, and the same keyword is highlighted in the full text.
Exec-path-from-shell-you can use the $ PATH environment variable.
Find-file-in-repository-search for files in the project based on git attributes
Emmet-mode-similar to zencoding, but can edit css, a complex div/css can be constructed with very little code
Browse-kill-ring-view the deleted text of the latest operation and the restored result

Installation and Use


Curl-fsSkL https://raw.github.com/cask/cask/master/go | python
Git clone https://github.com/dongweiming/emacs.d. emacs. d
Cd. emacs. d
Cask
Sudo pip install jedi pep8 autopep8 flake8

Shortcut key distribution

See README. md of the project.

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.