Enumerate some of the key bindings in Linux that you can try

Source: Internet
Author: User
Keywords Linux Key Bindings
Tags control delete editor example firefox gdb key key bindings

Wait, is it necessary to remember so many shortcuts? It's so complicated!

We strongly recommend that you remember to significantly improve operational efficiency. And this is the key binding of the ReadLine control, which you can use in any program that uses the ReadLine control. For example, Bash, lftp, gdb and other programs, at the same time, Linux's most famous Emacs editor, but also this style of the key binding (in fact, the readline using the Emacs-style key binding to), and even Firefox, can also use similar style of shortcut keys! (Linux has two main styles of key binding, one is VI style, the other is Emacs style, we will introduce in the concise vim tutorial)

Now enumerate some ReadLine key bindings that you can try yourself. (Run the man readline command to view the ReadLine manual)

Let's take a look at some of the conventions:

\c-a said that CTRL + A
\m-a indicates that the Meta+a Meta key is usually the ALT key in the PC
A means Shift+a
(The \a in brackets below represent alt,\s for shift)

Move command:

\c-a move to the beginning Aheah
\C-E move to end of line
\c-f move one character forward Forward
\c-b move one character backward backward
\m-f Move one word forward
\m-b Move one word back
\c-l Clear the screen

These two commands can also be understood as move commands

\c-p, Previous command Previous
\c-n, Next command

Edit command:

\c-d deletes a character after the cursor \m-d deletes a word after the cursor http://www.aliyun.com/zixun/aggregation/16487.html ">delete
\backspace Delete a character before the cursor \m-backspace Delete a word before the cursor
\c-k Delete cursor to end of line part Kill
\c-u deletes the cursor to the beginning of the section Unix-line-discard
\c-w Delete a word before the cursor
\c-y paste (last deleted object) Yank
\c--Undo

Search history:

\c-r continuously uses ' R ' to find the next
\m-p
\m-n

Complement:

\tab uses the highest frequency function!
\c-o traversal completion (undefined)
\m-? m-= lists all possible options, equivalent to pressing the TAB key two times (M- The actual button is \a+\s+/)
\m-# comment out the current command to temporarily save the current command in the History list (\a+\s+3)
\m-! A complement command, usually used to complement a child command, such as a subcommand of ' sudo ' (\a+\s+1)
\m-~ Full user name (\a+\s+ ')
\m-@ Full host name (\A+\S+2)
\m-$-Complement variable (\A+\S+4)
\m-_ History Record (\a+\s+-)
\m-* put all possible options on the command line (\A+\S+8)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.