Learn Linux Programming with me (3) ------------------ Tools

zhaozj2021-02-16  51

This time I want to say is the remaining two tools. Emacs This is a heavyweight editor under Linux. In fact it is not just an editor, you can treat it as an integrated development environment, which will be mentioned in the article. Emacs' design philosophy is to edit as a center, which provides support for Shell and other tools, but all in its editing environment. For a character type of editing environment, you are a lot of shortcuts, which is very different from Windows habits, but what you want to explain is that all operations in Emacs can be completed by shortcuts, and when you are complete When it becomes a part of your life, its efficiency is very high. Of course, I would also like to thank people who have also contributed to the GNU world, huh, not much. I practiced these shortcuts for two days, and then I threw away the notepad under Windows and installed a WINDOWS version of Notepad. There are two shortcuts in EMACS, one is the abbreviation C of Ctrl C, indicating a short-written shortcut, one is ESC, can be replaced with Alt in Xemacs (a variant of Emacs), indicating complete The version of the shortcut key form, the commonly used shortcuts have the following: CX CF Open File CX CS Save File CX S Save All Opened Buffer CXO to another window CX 1 Maximize the current window CX 2 Put the current window Split the two window CX 3 Segment the current 口口 into a horizontal two windows

ESC-X c-set-style can set the habit of c mode, such as the indentation method, what is simple, huh, huh, then mention other, or that sentence, you know more about the tool, The higher your work efficiency. The foreigner regards Emacs as a document, it can be seen that there is a book about its books in China, what is the name (second edition), good, I just see that learned. Finally, there are still many people who use another editor VI, which is also a powerful tool, but I have not used it, so I can't compare it. The last one is the program debugging tool in GDB and character mode. Why do you use the character mode without graphical mode, or that sentence, not all Linux can support graphics mode, but all Linux supports this. Although there are also a commissioning tool in graphics mode, but when you read this text, maybe you will know, what is what you need. I remember someone to say a word, if you are not happy, you don't know how to find fun, huh, huh. Ok, let's talk about a GDB. First open the GDB, then open the executable to be debugged with the open command, the premise is that your program uses -g parameters when compiling to join debugging information. Then use Run to run the program; use Kill to terminate the program; set the view with Watch; use the Break Overpot, here you can use the file: line number, you can use the file: function, for C , you can use the class name: Member function form; continue to run with Continue; use Step single step; use Next step to perform without entering the inside of the function. There are still many other orders, this is the most common, it is good.

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

New Post(0)