Vim command learning summary today I have reviewed the operations in the vim editor and made a record of some commonly used commands. Vim can be regarded as an advanced version of vi or a "program editor ". Its official website claims that vim is a "program development tool ". Vim has three modes: general mode, edit mode, and command mode. Www.2cto.com in normal mode, the files opened with vim directly enter the normal mode. In this mode, you can move the cursor by pressing the top, bottom, left, and right buttons to delete, copy, and paste the cursor. In this mode, Common commands are as follows: [Page Down] [Page Up] Page turning G moves to the first line of the file. gg moves to the last line of the file x, X x deletes a character backward, X is the forward deletion of a character dd (ndd) to delete the entire (n) row of the cursor yy (nyy) copy the (n) row of the cursor p, p. paste the copied data in the next line of the cursor (the last line) u. Restore the previous operation www.2cto.com [Ctrl] + r and redo the previous operation. In edit mode, press I, a, o, r enters edit mode command mode: w writes the edited data to the hard disk file: w! Force write to this file: q leaves vim: q! Do not save force Exit: wq save and exit: w [filename] save another file: r [filename] adds the file content to the vim multi-file edit www.2cto.com vim test.txt test1.txt behind the row where the cursor is located. Two files are opened simultaneously: n editing the next file: N editing the previous file; files: list all opened files. Multi-Window Function: Enter sp test1.txt in a text.txt file to enter multi-window mode.