VIM Lecture Notes

Source: Internet
Author: User

Vim Introduction Vim is a powerful full-screen text editor, which is the most commonly used text editor on Linux/unix, and its function is to create, edit and display text files. Vim has no menu, only commands.

For the pure novice, these three patterns are still a bit difficult to understand, then I hope you can listen carefully.

Command-line mode (commands mode/general mode)
At any time, no matter what mode the user is in, just click the "ESC" key, you can get VI into the command line mode; We enter the Launch VI command under the shell environment (prompt $), which is also in this mode when you enter the editor.
In this mode, users can enter a variety of legal VI commands for managing their own documents. Any character entered from the keyboard is interpreted as an edit command, and if the input character is a valid VI command, VI completes the corresponding action after accepting the user command. Note, however, that the commands you enter are not displayed on the screen. If the input character is not a legal command of VI, VI will ring the alarm.

Text input mode (input mode/edit mode)
In command mode, enter the Insert command I (insert), attach command A (append), open command O, modify command C (change), replace command R, or replace command s to enter the text input mode. In this mode, any characters entered by the user are saved by VI as the contents of the file and displayed on the screen. In the text input process, if you want to return to the command mode, press the "ESC" key.

Final line mode (last lines mode/command mode)
VI has a dedicated "escape" command to access many of the line-oriented ex commands. In command mode, the user presses the ":" Key to enter the last row mode, at which time VI displays a ":" As a prompt in the final row of the display window (usually the last line of the screen), waiting for the user to enter a command. Most file management commands are executed in this mode (such as writing the contents of the edit buffer to a file medium). After the last command is executed, VI automatically returns to the command mode. Save the file or exit Vim, as well as set up the editing environment and some compilation work, such as listing line numbers, finding strings, and so on.

Category:getting started | Vim Tips Wiki | FANDOM Powered by Wikia
http://vim.wikia.com/wiki/Category:Getting_started

VIM Lecture Notes

Related Article

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.