📄 l3.3
字号:
#print Basic Alteration - Undoing and Redoing The worst thing about the delete command is that sometimes you wish youhadn't. No matter what single change you make to the file, though, vi canunchange it. If you accidentally remove 64 lines of the choicest prose you'veever composed (presumably by typing 64dd), simply hit the u key. Voila,those priceless words are back in the file. If you change your mind andwant to be rid of them again, just hit that u key once again. Whammo, vihas undone its previous undo! Of course, you could then undo thatundo and bring the lines back again. This can go on a long time, one undobringing the lines back, the next getting rid of them again. Be careful,however! Vi can only undo the very most recent change you've made to the file. As a special case of this undo feature, if you make several changes allto the same line and want to undo all of them, just type U and the linewill be restored to the way it was when you came to it. Another great convenience is the . command, for redoing the last change.This can be handy if you want to insert the same text in several places. Justdo it once and then, for each other occurence, move to the proper place and hitthe period key. Vi will automatically make the same change in the new place. Type 'ready' once again to try out these features.#user#create UndoRedo The undoing and redoing commands are as follows: u will undo the most recent change, including another undo U will restore the current line to the way it was when you last came to it . will redo whatever the last change did Play around for a while with these commands and get a feel for what theycan do and what their limits are.--------------------------------------------------------#cat /usr/lib/learn/vi/longtext >> UndoRedovi UndoRedo#next3.4 10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -