Using Emacs to Program

Source: Internet
Author: User
Tags function definition lua sqlite plantuml

Use Emacs to program table of Contents
    • 1. Project Document Management
    • 2. Code Jump
    • 3. Code completion
    • 4. Code Checking
    • 5. Library function Document view
    • 6. Mvc
    • 7. Other small functions

Look at Baoha June's system-config configuration in the use of help video ten years of Linux, the century Emacs, feel very powerful. There are a lot of blogs, such as the system-config principle and the use of a brief description. This is a new work flow and interaction mode, to apply some of the good interaction in Emacs to bash on the Linux System (sawfish window management). This creates a complete set of your own programming environment, very efficient and practical. It can be said that for programmers, it is also a kind of craftsman spirit, the programming development process and development tools to achieve extreme behavior. It is also possible to see the power of Emacs, and the way in which Emacs operates and the concepts that combine with other tools and systems to produce a more powerful combination. Of course, I did not do Android development, so I do not realize in 2G or even 9G of the source code to find the pain. The helm-gtags I am currently configuring and using can be used to find and locate code. Of course, the current is not enough, for the definition of functions, the function of the call is not judged, you need to manually go up and down to find. So you can learn from him to find out the function definition and call.

Currently, the completion of my programming environment is:

1Project file Management

Use Helm-projectile to make file lookups for your project. After using this plugin, it is very convenient to open and query a file in a project. Just press C-c p f on it, then enter a partial file name, it will be blurred to match the relevant files.

2Code jump
    • Project-level jumps currently use Helm-gtags to directly find the definition and invocation of the current word throughout the project. Because the project is not big, so, basically appear not too many times, can be very convenient preview, or jump in the past. You can also use this plugin to search for results, and then edit the results of all searches, save, and then save the changes to the project's different files. This is equivalent to the ability to quickly rename or refactor a project.
    • Jump within the file jump file, mainly using Helm-swoop and Helm-imenu. Helm-swoop can find multiple locations where the keywords appear in the file, then preview and jump. You can also edit it to make it easier to rename multiple function names or variables in a file. Helm-imenu is mainly to jump directly in the function.
3Code completion
    • Context completion code completion using COMPANY-MODE,TCL language mainly use Company-dabbrev and Company-keyword can, originally also rewritten a COMPANY-GTAGS-TCL used in a timely context auto-completion, However, it is found that the gtags is used to find the complement, and if very frequent calls are delayed. Therefore, another shortcut key is defined to be called separately. In this way, this function can be used throughout the project to create all the functions and variables of the index index, and then the library function to complete the ctags, you can also by the way the function of the parameter call mode. For small, dynamic languages, the project is more convenient.
    • Yasnippet

      Defines a number of common yasnippet that can be quickly inserted into some common blocks of code.

4Code Check

The code was checked using a FLYCHECK-TCL for a period of time. But it's actually not very useful to find this. Because the general error does not need code to prompt. Logic errors, or other errors, are not checked. So I turned it off.

5Library function Document view

Previously wrote an article about how to view HTML documents: emacs-w3m viewing HTML Help manuals

6Mvc

Created an MVC package to quickly generate a basic module file structure.

7The other small functions

In addition, I have also written some elisp small function, used to copy the current definition of a function, or the entire code of the current file, to be pasted in the Debug window.

Date:2017-01-14 14:37

Created:2017-01-14 Saturday 15:33

Validate

Using Emacs to Program

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.