Vim Text Editor

Source: Internet
Author: User
Tags save file

Linux Vim Text Editor

Vim Overview

Linux offers a wide range of powerful editors, such as VI and Asciitext,and Unicode is the first full-screen interactive editor for Linux systems. VI (VIM) commands are numerous but if used flexibly it will greatly improve efficiency. VI is the abbreviation for "Visual Interface", Vim is VI improved (enhanced version VI). In general system Management Maintenance VI is sufficient, if you want to use code highlighting can be usedvim. VimThere are 3 modes of operation, namely command line mode, insert mode, and bottom line mode.


Command-line mode: The general mode of the initial entry, in which the cursor can be moved to browse, the entire row deleted, but the text cannot be edited.


Insert mode: Only in this mode will the user be able to edit the text input and the user can use the [ESC] key to return to the command line mode.

Bottom line mode: In this mode, the cursor is in the bottom row of the screen, the user can save or exit the file, or set the editing environment, such as looking for a string, listing line numbers.

Creation of VIM

# VIM [options] [file:]

+#: After opening the file, leave the cursor directly at the beginning of line #. (#表示注释行)

+/pattern: After opening the file, leave the cursor directly at the beginning of the first line that is matched to the PATTERN.

Vim's preservation

       : w//Save file

: w Flie//Save to Flie file

vim

    :q    //exit editor, use the following command if the file has been modified

: q! Exits the editor without saving

: Wq//Exit editor, and save file

mode conversion:

Edit mode--input mode shift+i

Input mode--edit mode ESC

Edit Mode---last-line mode shift+:

Last-line mode--edit mode



I:insert, enter at the cursor position

A:append, enter at the rear of the cursor

o: Opens a new line below the cursor position

I: Enter at the beginning of the line where the cursor is located

A: The line at the end of the line where the cursor is entered

O: Opens a new line above the cursor position





This article is from "Jet ' aime" blog, declined reprint!

Vim Text Editor

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.