Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux emacs command

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to use the Linux emacs command". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "how to use the Linux emacs command" can help you solve the problem.

Linux common command emacs is a powerful full-screen text editor developed by Richard Stallman, the founder of GNU organization. It supports a variety of programming languages and has many excellent features. Many system administrators and software developers use emacs.

Emacs's powerful full-screen text editor

It is added that the emacs command is a powerful full-screen text editor developed by Richard Stallman, the founder of the GNU organization. It supports a variety of programming languages and has many excellent features. Many system administrators and software developers use emacs.

Syntax emacs (options) (parameters) option +: start the emacs editor and move the cursor to the line where the line number is set;-Q: start the emacs editor without loading the initialization file;-u: load the initialization file for the specified user when the emacs editor is started;-t: when the emacs editor is started, the specified file is used as the middle, and standard input (stdin) and standard output (stdout) are not applicable -f: execute the specified lisp (programming language widely used in artificial intelligence) function;-l: load the specified lisp code file;-batch: run the emacs editor in batch mode. Parameter file: specifies the text file to edit.

Emacs command operation Daquan basic command

Cmurx Cmurc: exit Emacs Cmurx Cmurf: open a file, and if the file does not exist, create a file Cmurg: cancel unfinished command editing

Cmurz (redefined): Undo; originally Cmurz is suspended Emacs (then called up with the fg command); Cmurx u is the default command; move the cursor, and then Cmerz can redo Mmerd: move the cursor after the cursor is deleted

Move the cursor to the line in the middle of the screen. Move to the beginning of the line. Move to the beginning of the sentence. There may be a space between the beginning of the line and the beginning of the sentence: move to the end of the line M: move to the end of the sentence M-{: move up a paragraph M -}: move down a C-right: move a word forward C-left: move a word backward C-up: move a paragraph forward move a paragraph M -: move to the end of the entire text Word command: execute this command multiple times (number of times) "M-digital command" can also be Mmurx goto-line: move to a line Cmurl: redraw the screen, the effect is that the current editing line moves the window in the center of the Buffer

Cmurx k: close the current buffer Cmurx b: switch to the buffer Cmurx Cmurb edited by the previous editor: list all current buffer Cmurs: save the current buffer Cmurx s: save all unsaved buffer, it will prompt you whether you need to save Cmurx Cmurw: save the file as copy and paste

M-space (redefined): set mark; Cmurw @ is the default command Cmurw (redefined): cut a region; if mark is not set, cut a line Mmurw (redefined): copy a region If mark is not set, copy a line Cmurk: cut from the current position to the end of the line: paste Mmury: use Cmury to pull back the recently removed text, and replace it with Mmury to pull back the previously removed text. Type Mmury multiple times to pull back text that was removed earlier. Cmurx rk: perform clipping of rectangular region Cmurx ry: perform paste window operation of rectangular region Cmurx 0: close current window Cmurx 1: maximize current window 2: vertical split window Cmurx 3: horizontal split window Mmuro (redefined): switch between windows Cmurx o is the default command Cmurx 51 Universe 2Universe 3Universe: similar operation to frame Cmurx: window contents left volume (these two commands are more useful after vertical split window) (Cmuru) Cmurx ^: elevate the current window, if there is a Cmuru Then increase 4 lines at a time (Cmuru) Cmurx}: widen the current window (Cmuru) Cmurx {: narrow the current window ESC Cmurx v: scroll screen search and replace in other windows

Cmurs: forward search (incremental search); continuous Cmurs, skip to the next search target Cmurs RET: general search Cmurr: forward search Cmurs RET CMuw: query Mmurs% by word: query replacement, that is, ask Mmurx replace-string: general replacement Tags before replacement

Mmury! Etags. C. h: create the TAGS file Mmuri. Skip to tag location Mmurx list-tags: list tags bookmarks

Cmurx r m: set bookmarks bookmark Cmurx r b: skip to bookmark to help

Cmurh?: view help information Cmurh f: view a function Cmurh v: view a variable Cmurh k: view a key binding (Cmurh c also view key bindings, but the information is brief) Cmurh Cmurf: view the info of a function, very useful Cmurh I: look at other Info

Cmurm M -\: format the selected area according to a certain format (for example, C program) Cmurx h: select all Mmurx!: execute external shell commands Mmurx shell: simulate shell's buffer Mmurx term: simulate terminal, Cmurc k close terminal Cmurx CMuQ: modify buffer's read-only properties on "how to use the Linux emacs command" content is introduced here, thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report