Emacs Start: Direct Emacs, if you have X-Windows will open the window. If you don't want to use X, you will start with Emacs -nw (no windows). Symbol Description CX means holding down the Ctrl key, then press X, then Ctrl, X is released together. MX Meta Meta On the computer without META keys, MX is equal to pressing the ESC button first, then press the X key. The Meta button on the Sun is the key of the rhombus. Some system META keys are Alt keys. (Or Alt key on a certain side) CX or MX x is not caseped separately. The Emacs button command is basically a string C-
CH is HELP's meaning after EMACS, which means that this deleted action is Kill, not equally equal to Delete. Emacs will put Kill Ring to Kill Ring, is a temporary place, afterwards You can call it. See YANK instructions. Undo: CX U c-_ _ equals CX u Some DEC terminals, C- / is c-_ _ Sometimes equal to C-Shift- - Repeat Executation Example, shift 8 words to right, Cu 8 CF CU is quite special in Emacs, used to set some of the quotes (Argument / Repeat count) to future commands. Cu 2 0 CN moves down 20 rows There is a special exception, Cu 3 CV is not turning three pages But the entire screen is shifted up. It is said that this is meaningful. Cu 1 0 CX u Undo 10 times to CL a quoter: Cu 0 Cl will redraw the screen, and move the current row to the screen OK. In addition, Cu 100 is equal to M-100 Cu numbers equal to M-digital X Windows, C-LEFT C-Right moves one word (Word). C-Up C-Down moves (paragraphs / C language is Block Home = ca end = ce c-home = m-
Paste's meaning. Most of the above commands are also valid for the Bash command. Read files: Emacs Terminology is finding a file. CX CF is then entered in Mini-Buffer. When entering the file, the SPC key has auto- Complete features, or show a few words in front of the dynasty and input until the file is now, (Tab "also has a similar function) CX CF called Find-File CX CS archive (SAVE CURRENT FILE, SAVE CURRENT BUFFER) CX S The file CX i is inserted into the file to read the contents of the additional files. In the current editing area, the window Emacs reads the file. There is buffer. We look through the window / edit buffer. Two window will cut the screen into two parts. They can display the same, or different files at the same time. For beginners, what is the most needed is how to let the unwanted window disappear: CX 0 Turn off the current window CX 1 will make the current window account for the whole ONE Window, cancel / turn off other windows. There are many functions in Emacs to open a small window to communicate, display the message. Sometimes it is very annoying, CX 1 is very useful. Another How is the function jumps to another window. CX O (Other-window) CX 2 cuts the current window into two (horizontal segmentation) CX 3 (vertical segmentation) CX 4 is a string of instructions related to the window. CX 4 is A string of instructions related to the window. CX 5 is extended to X -ty-x window, called Frame. CX 5 2 is another X Window (Frame). Multi-file editing CX CB sees now there are more buffers (buffer Emacs) The place where the file is released). CX B and then enter the name of the buffer in Minibuffer. You can switch the editing of the buffer. Tab button also works. Some internal buffers (there is no file buffer), use * start and end, this also To hit, such as * scratch * to remind: CX 1 can turn off the window. Emacs expansion instruction, the EMACS button introduced before Part is C-
The form. This is the simplest, which makess an instruction by a pair of press. The button of Emacs can exceed 2 or more. Such as CX 1 or CX CB. Generally more than one button combination is started with CX. In addition you You can also directly down command. You can do an EMACS command after pressing MX. Generally, these command names are very long, but they are not used. We will introduce some. Also introduce how to set these commands into button instructions. The CX CC ends Emacs. However, general Emacs is very cumbersome, once the start is not easy to exit. So comparing the CZ CZ to pause Emacs, return to the command column. When you need to edit, you can play fg% emacs Woke Emacs. In X, CZ is composed of Emacs to the Icon Mode Line Emacs Editing screen consists of a buffer state column (MINIBUFFER). The message displayed here is explained. Here is an example: - ** - Xemacs: Xemacs.QS (Fundamental) ---- 74% ------- Due to the back, 74% indicate the position of the cursor. (Fundamental) indicates the editing mode. This is the most original Mode. Editing Different kinds of articles may wish to use different modes, such as C-Mode, Lisp-Mode, TEX-MODE, TEXT-MODE, and more. There may be more buttons in different modes. For example, TEXT-MODE. MX Text-Mode can be cut into text-mode, which is a mode in which a general person edits text. There is no difference in Fundamental Mode. However, when the cursor moves, Emacs is different for the definition of a word, so MF MB and other moves, A paragraph directive may stop in front of the punctuation symbol. At this time, the status column is transformed into ... (text) ---- 70% - or above is Major mode. There is also Minor Mode, actually Some additional features. For example, MX Auto-Fill-Mode status column is displayed (Auto-Fill is automatically broken, so that the article is fixed to 70 words per row. MX Fundamental-mode can change back. Here Explain , Emacs has the function of auto-completion in Minibuffer, that is, MX Fund and press SPC, which will automatically make fun of Fundamental-Mode, do not have more than two options, it will tell you. This function is Find-file (CX CF) and other file editing functions are also effective. Previously mentioned. Finally explain two **. On the right * indicates that the article has been modified. The left * indicates that this editing area can be modified. Some Emacs's buffer is Read-Only Buffer, which will be made %% indicating that the file is Read-Only. CX CQ can unlock read-only lock, no matter how you want to change this editing area. This is a Toggle directive. If it is possible to modify, CX CQ will cut it into read-only. Search No Search feature editor is a child's toy. Search is a very important function, so Emacs also provides very perfect. CS CR MX REARCH-FORWARD MX RE-Search-Backward MX Search-Forward MX Search-Backward These instructions are basic Search instructions. Cs, Cr is increamental search, which is you typing, emacs directly help you find. One It is Forward, one is backward. What should I do? Press CG to cancel the search, jump back to the original position. Press Enter to let the cursor stop in the found place - this time Markuffer display: Mark Saved Where search Started What do you mean?
It is Isearch to help you set a mark in the original location, then move Point (Cursor) to a new location. Want to jump back to the original place? CX CX is OK. (Exchange-point-mark) Cu C- The SPC can jump back to the place where Mark is set in sequentially. (C-SPC is a MARK, give it an argument, it is back) (I don't remember that the CU can give the following parameters. Some instructions take this Parameters are used as Repeat Count, some instructions are only used as ON / OFF, TRUE / FALSE, SET / CLEAR) MX RE-Search-Forward allows you to search with Regular Expression. MX Search-Forward does not include Increamental Function. Another directive, role, and grep are very similar to: MX Occure and Search have relatively Replace. MX Replace and then press SPC, know. Emacs Settings: Emacs set file is $ homen / .Emacs How much should you? Knowing that Emacs is a editor written with Lisp. EMACS gear is also a syntax setting with LISP. Emacs uses Lisp called ELISP, and a general LISP is a bit. There is an info page, Emacs-Lisp- Intro, in-depth introduction of Emacs Lisp. If you don't, you don't understand Programming, I strongly recommend that you see this document. If you will texinfo, you can print it very beautiful. (some point, two or three days After reading it), if you get. Permacs, I'm strange, what should I do? 1. Change it with VI. Emacs:> 2. Emacs -q into Emacs Major Modes A generally common Emacs Major Mode with Fundamental-mode text -Mode Lisp-Mode has automatic parentheses / rearrangement, direct Lisp Code functionality. C-MODE / CC-MODE C-MODE is the old C-Mode, CC-Mode should be currently new c-mode. Automatic rearrangement / pair The function of parentheses can also be compiled in Emacs, jump to the Compiler Error correction error. The execution program is demug. (With DBX / GDB) Compile is performed through Makefile. Tex-Mode Tex / Latex editing. Must be played some The strange punctuation is relatively convenient.
-Mode also features Tags. HTML-MODE, TEXINFO-MODE, SGML-MODE: Write HTML, TEXI, SGML. W3-Mode WWW Browser. Not satisfied with X-WIN, but acceptable .. Tags tags is a distinctive function? So I want to mention it. This is not an emacs invented, but the vi original special function. Emacs just carry forward a lot. Suppose you have a directory, the original code, the original code, For example, TiN's original code is placed under ~ / tin-1.3beta. You want to see them. First, call Emacs CD to this directory: MX CD then build Tag Table. Tag table is a comparison table, which is recorded Which of the files is reflected in which file is included. With this table, Emacs allows us to travel in the program code. Generally this table is a file, called Tags (capital) M- ! Etags *. [Ch] m-! It is the meaning of External shell command. Etags is Emacs's construction schedule. Just tell it that your Source Code is in that □. VI is using CTAGS, it built The file name is Tags (lowercase). Because we introduced Emacs, no matter whether it is. Then, how do you know? You know that all C programs start from main (), so you want to find main () in which file. Just press M-. Then Emacs will ask where tag table. Because we have already cd to this directory, press ENTER. Then enter main, Emacs will bring you to main () {... } Go. If you see a piece of step call, you haven't seen it, you can move the cursor to the name of the letter, m-. Enter is getting it. If Emacs is wrong (for example Variables and fifths are the same name, Emacs jump to variables), then you can use CU M-. Look. When editing program code, M-SPC is useful, it will zoom in a blank near the cursor. Other places are also effective. Some packages of Emacs: MX Dired (or CX D) Tour / edit catalog, the meaning of the profile of the file MX MX MAN is the man page mx shell to open a Command Prompt, but you can't run VI, ELM, TIN ... MX GNUS read news / read letter MX Rmail read letter MX VM View Mail MX MH-RMAIL Reading (Package MH-E) MX MH-SMAIL Send (Package MH-E) Strong List Recommendation to use Emacs to read news / bbs. The world will be better!
If you read the letter, you will look at your feelings. These readers will move the letter from the system's mail folder to their own directory, take up quota, I don't like: P suggest ELM or MUTT. Unless to participate in the mailling list with procmail. Otherwise Not practical. Use MH-E to install MH this outer program, not very good. It is recommended to write the letter, CC CC can be sent. If your data is managed by RCS / SCCS, Emacs will start Version Control (Minor Mode), CX CQ turns CHECK-IN / Check-out. How to get more information: Emacs's LISP has become a complete self-documenting system after years of development, and many things can be found online. You want information. I have said before, or you have already encountered Backspace, CH (which is backspace's ASCII code) is Help in Emacs, which can bring a string of instructions. Commonly available: CH f Emacs FAQ CH T Emacs Using Ch N Emacs News File, introducing new features recently revoked new features CH I info system. Info is a system for replacing Man Page, basically and text models are similar. There are many important information. I found it here. If you are a newbie, I suggest you look at X-WIN. Otherwise, button M (Menuitem), SPC Next Page L (Last Node: Node is the meaning of the chapter Meaning) u (Up node) D (Directory, Index). BS (Backspace, Back a page). If all Press SPC, just like MAN. Ch K Describe Key tells you to execute the LISP Function. CH f Describe function. Tell you what is Function. If you press SPC, Emacs will give you a list of all LISP functions, and Description. CH V Describe Variable meaning with function. CH a Apropos. For the part string of Lisp Function, Emacs helps you find. CH B lists all of the current keybinding ch m mode help. List the current MODE Specific instructions. CC CH lists all Key-binding at the beginning of CC. Although Emacs can define buttons, all combinations of Ctrl-starting are probably used, only CC is self-defined. However, some modes also violate This space. Current convention is cc
List: (1 2 3 4) is a list consisting of 4 Atoms. Pair: The middle is a period. (Apple. 2) Alist (Associated List) is a bunch of PAIR's collection, like Perl / TCL Associative Array. Or is a database, a bunch of key, value. 1) (ORANGE. 2) (PineApple. 3)) VECTOR (?) Emacs 19 Use Vector to represent the key (Key Strok Sequence) [F1] [F1 A] NIL is empty List, or said False T true Forms, we have the easiest version of our writer. It is the easiest version. Form is a sample, but it is not the same. Form is ELISP acceptable sentence type. LISP Explosive Preset is the evaluation of each element of the List, unless SPECIAL FORM, there is a special definition. For example, DEFUN FUNC (Arg-List) Body ... ) Is a Special Form, which is used to define a function, so FUNC will not be evaluated, and it is called Symbol, ... (quote (list)) This is also a Special Form, called Lisp Put (List) When doing Symbol Do not evataate. Quote is very common, so there is an abbreviation: '(List)' asymbol can represent an Atom, named the ASYMBOL SET can generate / define new variables. (SET 'HELLO 1); Hello = 1; Note We use 'Hello, so Lisp will not evata Hello value. This guy is very common, there is also a short-write. (SetQ Hello 1) setq is the abbreviation of Set Quote. This is a Special Form No value to the second element. VALUATION Under EMACS, CX CE can perform the narrative of the left side of the code. The result will appear in the minibuffer. Lisp-interaction-mode can evata, and put the result Append to Buffer. The LISP program consists of a bunch of list. This is called expression. Each Expression is back to a value. Some expressions have side effects, such as deleting a word. (this is the meaning of c's Int delete_char () Remove the int, and delete a CHAR) Define the function: (DEFUN NAME (Args-List); Optional (Interactive); Optional Body Defines a letter called Name. Body is a bunch of Expression. Annotations It is used to display CH f. (Interactive) means this letter and the USER / BUFFER function. (Interactive "B") Indicates that the user will ask the USER a Buffer name and then pass it as a parameter. (For example, when User calls this function through key-binding or MX) (Interactive "BAPPEND TO BUFFER: / NR"
When you ask User Buffer Name, the prompt number append to buffer: This function has two quotes, the first is B, which is the second of the buffer is R, region is separated from the / N. (Intective "P") with CU Prefix passes it as a parameter to me. Preset value == 4. CU CF shifts four words some LISP Versions: (List 1 2 3 4) Generate '(1 2 3 4) (car') 1 2 3 4) (CDR '(1 2 3 4)' (CONS 1 '(2 3 4))' (1 2 3 4) (CONS 1 2) (1. 2) (CONS) 0 (CONS 2 NIL)) is equal to '(0 1 2) {List is string with pair, with C, use: Pair: {Object * first, Object * second}; * (Pair [i]. First) == i; pair [i] .Second == Pair [i 1];} (cons' (1 2) '(3 4))' ((1 2) 3 4) (Setq A 1) (SETQ A 1) 1 a); A 1 ( 2 a); A 2 (* 1 2 3 4) (CURRENT-BUFFER); Switch-to-Buffer (Other-Buffer) (Other-Buffer) (Buffer-size) (Point-MAX) (Message ") (," (IF (Test) (Test) (Test) (Test) (Test) (Test) (IF) (IF (Test) Else-Part)) (COND) ((TEST1) BODY1) ((TEST2) Body2) (Test2) (Test2) (LET ((Var1 Value) (Local Variable Var2; No Value (VAR3 Value) ...) Body ...) (Lambda (arg- List) ...) with defun, but there is no name (anonymous) can be saved: (setq hello (message "Hello, World")))))))))))))) (Funcall Hello) (goto-char (Point- MAX)) (DEFVAR VARUE "* Note") If Var does not exist, you can use CH V to see. The annotation of the * number is the user can change / this variable is originally set to the user. You can use MX Edit-Options to set up (Emacs ending, but Edit-options can give you a list of all modified variables, you can put it in the .emacs file. (Directory-files "./ "T"