Vi general usage General mode h left j down k l right 0 move to the beginning of the line $ move to the end of the line H screen top M screen Center L screen bottom G file last line work down search? Wo vi General Usage mode h left j down k l right 0 move to the beginning of the line $ move to the end of the line H screen top M screen Center L screen bottom G file last line/work down search? Work: move gg to the first row of the file. edit mode a, I, r, o, A, I, R, O enter edit mode dd delete cursor current row ndd delete n rows yy copy current row nyy copy n rows p, P paste u undo [Ctrl] + r redo the previous action [ctrl] + z pause exit command mode: w save: w! Force save: q! Do not save and exit: wq! Save and exit: e! Restore original File: w filename save as: set nu set row number: set nonu cancel row number ZZ save away: set nohlsearch permanently disable highlighted display: sp open two documents at the same time: [Ctrl] + w. set nohlsearch to temporarily disable highlight.
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.