VI and Emacs are respectively known as the editor of God and the editor of God. VI is very difficult to get started, Emacs easy, proficient difficult, vi used to constantly switch mode, and Emacs is constantly ctrl,meta and other key combinations. So the master Gartner says that manipulating Emacs is like playing the organ.
VI is modal, so he rarely uses a combination of keys, editing is really efficient, and I'm tired of the constant mode switch. Emacs was selected. Coincidentally, in foreign countries, almost all the masters are using Emacs, James Gosling (Java language Designer), Donald Knuth (), Jamie Zawinski, Eric Benson. I think real engineers are using Emacs. Emacs is the kind of editor that you can use for 100 years.
Next, you'll learn how to use Emacs to write, compile, and run C programs. (The first statement, this is for beginners to see.) ):
1. After entering Emacs, c-x,c-f find the file or create a new file
Then write the program, such as HELLO.C2. Save the program you wrote, the command is C-x,c-s, 3. Compile the program. Use the command m-x shell or m-x Eshell for Shell mode, then compile with Gcc-wall-o Hello hello.c, and if you do not have GCC installed, first install GCC 5. Switch back to edit: C-x B ' buffername ' can switch to A buffer, if you want to switch back to the hello.c edit area, enter C-x B "Buffername". With the wood found, Emacs is more useful than VI. Second, Emacs button
Vim divides control and editing into two modes, which operate independently of each other. Emacs is both edit and control, but control commands require the use of control keys.
Emacs's control keys are available on three control,shift and Meta,control and Shift keyboards, and Meta is alt in the American keyboard, which is the four-lap key on the Apple keyboard, if there is no alt on the keyboard (This is for some European talent will encounter) can use ESC instead, the other ESC do not want ALT usually when the combination of keys, it should be a separate click, and then press the other.
The control commands are then expressed as follows:
C-f ctrl+f
C-m-f ctrl+alt+f
C-_ ctrl+shift+-
How to use Emacs to write a C language program and compile and run