linux04--Text editor Vim

Source: Internet
Author: User

Introduction to the commonly used text editor in 1.Linux system • Command line Vi/vim: A built-in editor commonly used in Unix-like operating systems, it is a powerful feature after operation. Pico or nano: A text editor with an edit style that is much like Microsoft DOS.     Some distributions are not installed. The Emacs:linux Editor features a powerful full-screen editor.    • Graphical interface Emacs Programming editor. Gedit Full screen text editing program.   2.VI Introduction VI is the Linux world's most commonly used full-screen editor, all the Linux machine provides the editor, and Linux is provided by the VI of the enhanced version (VIM), and VI is fully compatible.   VI's original intent is "visual interface", that is, the visual editor, the user type of content will be displayed immediately, you can perform output, delete, find, replace, block operations and many other text operations, and users can customize it as needed, which is not the other editing programs. VI is not a typesetting program, like Word or WPS can be the font, format, paragraph and other properties of the orchestration, just a text editing program. VI has two modes of operation: Command mode, which consists of a sequence of commands that completes the insertion of certain actions. Type (insert mode): Allows you to enter text. VI's entry and departure ·Enter: Type command VI under System Prompt "$" followed by the name of the file you want to edit (or create), vi can automatically load the file you want to edit or open a new file. VI Text.txt VI'sExit: Commands can be used in command mode ": WqOr: q! ", the function of the former is to write files and exit from VI, the latter function is to exit from VI, but do not save the changes made (note the colon)." When the vi starts, it enters the command mode by default, and when in other modes, press ESC to return to command mode. Command mode: • I: Inserting text at the current cursor · o: Insert a new row below the current line DD: Delete the entire row yy: Copy the current row (puts the current row in the buffer) n+yy: Copy n rows P: Inserts the text in the buffer at the current cursor • U: Undo Previous Action • R: Replace current character •/: Find characters? in command mode, press ":" Enter the EX mode and the cursor moves to the bottom of VI. The usual ex commands are::w Save the current modification:q insert a new row below the current line:q!  Do not save exit:x Save and exit, equivalent to: QW:! Execute system Command:set number displays line numbers:sh switch to command line, Ctrl+d switch back to VIM

linux04--Text editor Vim

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.