Direction <-before and after->
Delete
CTRL + D deletes the character at the cursor location equivalent to VIM x or DL
CTRL + H deletes the character in front of the cursor, which corresponds to the HX or DH in vim.
Ctrl + K Delete all characters after cursor equals vim d shift+$
CTRL + U delete all characters in front of the cursor equal to VIM D shift+^
CTRL + W DELETE cursor before a word equals vim in db
Ctrl + Y restores the characters that were deleted when Ctrl+u was last executed
CTRL +? Undo previous input
ALT + R undo Previous action
ALT + D Delete the word after the cursor position
Move
CTRL + A moves the cursor to the beginning of the command line equivalent to Vim shift+^
CTRL + E moves the cursor to the end of the command line at the equivalent of vim shift+$
CTRL + F cursor moves backwards one character equivalent to Vim in L
CTRL + B cursor moves forward one character equivalent to Vim in H
CTRL + ARROW key left cursor moves to the beginning of the previous word
CTRL + ARROW key right cursor moves to the end of the next word
CTRL + X jumps between the last character of the cursor and the character at which the current cursor is located
ALT + F jumps to the end of the word at the cursor position
Replace
CTRL + T replaces the current character of the cursor with one of the preceding characters
ALT + T swap two cursor at the current position of the word and the previous word of the cursor
ALT + U change the current position of the cursor to uppercase
ALT + L CHANGE the current position of the cursor to lowercase
ALT + C capitalizes the first letter of a word in the current position of the cursor
^oldstr^newstr Replace string in previous command
History command Edit
CTRL + P returns the last input command character
CTRL + R Enter Word search history command
ALT + P input character find history command close to Word typeface
ALT + > return to last Execute command
Other
CTRL + S lock Terminal
CTRL + Q unlock Terminal
CTRL + L clear screen equivalent to command clear
CTRL + C from another line
CTRL + I similar to tab completion function
CTRL + O repeat command
Number of ALT + number key operations Actual operation:
#c +l Clear Screen first
[Email protected]:~>str1 str2 str3 #输入三个单词发现第一单词需要大写好按c +a Jump to the beginning press A+c
[Email protected]:~> Str1 str2 str3 #好现在单词就变成了现在这个样子, and found the second word to all uppercase (such a command is really dead: () Well, if your current cursor is in the second word, that directly a+u the word change, if not, then hold C+a and C+f jump to the second word, then A+u will be OK. The result is as follows
。
[Email protected]:~> Str1 STR2 str3 #我想换过来怎么办我的位置已经在最后一个单词这个好办按住a +2+b haha jump to the second word again a+l This second word is all lowercase, a more typical example
[Url]http://bbs.chinaunix.net/viewthread.php?tid=842595[/url]
Title: How do I capitalize the first letter of each word in a data file?
Haha, this is hard for us, because we're already a+c.
[Email protected]:~> Welcome to chinaunix! #不就是变个大小写吗按住c +a then a+3+c look at the effect
[Email protected]:~> Welcome to chinaunix! #GOOD很简单
Let's try the replacement again.
[Email protected]:~> Welcome to chinaunix! #还是这三单词c +a jumps to the beginning and then jumps to the second word (because a+t can only replace a word in front of it so you can't press a+t in the first word) to hold a+t
[Email protected]:~> to Welcome chinaunix! #现在成这样子的了如果我用再按a +2+t, that's a change.
[Email protected]:~> chinaunix! Welcome to #好了来一点比较常用的
[Email protected]:~>ls/tmp/#看看下面有些什么
File1 file2 file3 ...
[Email protected]:~>^ls^cd #现在再又想进入目录很简单的健入替换命令就行了在命令很长时用这个替换可以省掉很多按a +b or a+f time
cd/tmp/
[Email protected]:/tmp> #进入了tmp目录了
Linux command line common shortcut keys