Emacs Getting Started Guide (1)

xiaoxiao2021-03-06  116

I have heard that Emacs's open source file editor, I heard that its function is very powerful, so I decided to try it out, I didn't expect the trial result. The first impression of this "best use" editor is "" I don't know if I have a constant study, I started to experience the huge charm of Emacs, and started to start this introduction to Trinity, I hope to introduce this text editor to more friends. If you are already familiar with Emacs, this guide is not prepared for you, this guide only intends to introduce the most basic features in Emacs, providing an initiator to get a chance to get started. In addition, this article is told in Emacs under the Windows platform. If you are used on other platforms, you can also see it. Less nonsense, we start our study trip. First of all, it is of course to obtain the package of Emacs software and install it, in http://www.gnu.org/software/emacs/emacs.html, you can find its download address. I downloaded Emacs-21.3-Fullbin-i386.tar.gz this complete package 21.3 on this Windows platform. You can also download the latest Emacs single file in the CVS of Savannah.gnu.org via Emacs. (What? I don't know what CVS? Oh, it is an open source version control software, I don't know if I didn't say this. I will write a CVS.) Emacs does not need to install, directly decompressed After you can use it, I solve it in the D: / Program Files / Emacs-21.3 directory, which may mention "Emacs installation directory" means it. In the bin directory in the Emacs installation directory, there is an executable file of Emacs, which is Emacs.exe, double-click to run it. If you want to run it in a console environment in a console environment, you can add parameters-nw, indicating no window. In addition, run the addpm.exe in the bin directory, you can automatically create a menu item for Emacs in the Start menu. I also suggested that you build a shortcut for Emacs.exe in the SEND TO folder of the system, so if you want to use Emacs to open as soon as you select "Send to" Emacs. I believe so until now, I have seen the Emacs less friendly interface. When I just launched Emacs, it will show the cover of the introduction, point the mouse or press any key to switch to a buffer named * scratch *, there are three Comment, say you can write a message where you don't need the replication, or you can play some LISP statements to be executed, if you want to create a file, press CX CF. Before you really start using Emacs, please pay attention to the following: Due to historical reasons, many terms in Emacs, representation methods and operation habits are inconsistent with the current usual use, and keep this in mind, avoid confusion. In this article, EMACS terms will be followed, and English is expressed in English. The method of starting to edit a new file is to press CX CF. This means means: press CTRL X, then press CTRL F (Of course you can also press CTRL, knock X and F keys ).

At this time, in Emacs's Frame (in Emacs Terms, Frame refers to "window" we are used to Windows, and Window This term refers to the minibuffer at the bottom of several independent regions in a frame. The appearance prompt: Find file: D: / Program files / emacs-21.3 / bin /, you can enter the file name of the file to be created, the default path is D: / Program Files / Emacs-21.3 / bin /. If you do not change the default path, enter a file name directly, it will open a blank buffer in Emacs for editing. If you enter an existing file name, open this file in a new buffer for editing. That is to say that C-X C-F is a command that can be used for new or open files, it is unwrice that it is interpreted as Visit A ​​File in the EMACS manual instead of new file or open file. In most cases, you don't seem to be happy to create files in the default Emacs installation directory, so you may need to clear the default path that you have appeared and then write your actual path. In fact, there is no need to trouble, Emacs do very humanized in a lot of very small things, you only need to play one / then play one / then enter the actual file path in its default path, such as, I Regardless of its default path, enter /c:/1.txt can create or open the 1.txt file in the C-plate root, when entering the path and the file name, you can enter a part, then press Key, Emacs will try to help you automatically add complete, just like the file name and path in Linux and High Versions Windows command prompt. Emacs' very important design concept is to let your hands not leave the main keyboard throughout the operation (ie refer to the area of ​​the letter and the number key) to pursue the highest work efficiency. So this paper will be relatively small in this article. If you want to use your mouse to create or open a file, you can click the Open File of the File menu. You can also select the menu with the keyboard, but it is never alt f, you can press the F10 key, then select the appropriate menu item, the F10's performance pattern under the Windows interface and is different under the Console interface, but The operation method is consistent. Now you have already opened a new buffer to edit the file, you can try to enter something. In the input, if you exceed the end, Emacs will automatically wrap and display a continuation. Maybe you have tried the operation of "copy / cut / paste" during the input, and the result must be very disappointed. The shortcuts such as Ctrl C / Ctrl V commonly used in Windows are not right. Remember you again. To learn Emacs, you have to forget a lot of things. When you are slowly familiar with Emacs, you will like this powerful editor. In the process of uncertainty in the knockout, in most cases, you can press the C-g shortcut to interrupt the current error command from the beginning. For example, if you accidentally press CS, this is a shortcut key that saves files in Windows, but it prompts you I-Search in Mini-Buffer: Here you can quit, return to normal status, and quit reputation in MiniBuffer. Exited the current command. To save the file, the correct command is C-X C-S. To quit Emacs, the correct command is C-X C-C, if there is a buffer to modify unswerm, it will make a corresponding prompt, if you choose not to save, it also confirms whether it is really to exit Emacs.

转载请注明原文地址:https://www.9cbs.com/read-125786.html

New Post(0)