Go to: Vim Common commands

Source: Internet
Author: User
Tags first string

Run the vim command:   

Vim filename: open or create a file and place the cursor at the beginning of the first line
    VIM + N filename: open the file and place the cursor at the beginning of line N
    VIM + filename: open the file and place the cursor at the beginning of the last line
    VIM +/pattern filename: open the file and place the cursor at the first string matching pattern
    Vim-r filename: a system crash occurred when Vim was being edited last time, restoring filename
    Vim filename .... Filename: open multiple files and edit them one by one

Vim Configuration:
ALL: lists all options.
Term: Set the terminal type
Ignorance: Case Insensitive in search
List: displays the stop table (CTRL + I) and end mark ($)
Number: displays the row number.
Report: displays the number of changes made by line-oriented commands.
Terse: displays brief warning information
Warn: No write information is displayed if the current file is not saved when it is transferred to another file.
Nomagic: allows you to use special characters without "\" in search mode.
Nowrapscan: Prohibit VI from searching at both ends of the file and starting from the other end.
Mesg: Allows VI to display the information that other users write to their terminal using write.
: Set number/set nonumber: Show/do not show row number
: Set ruler/set northeasters: Display/do not display the ruler
: Set hlsearch highlight the searched words
: Set nohlsearch disable highlighted display
: Syntax on # Syntax highlighting
: Set nu # Display the row number
: Set tabstop = 4 # Set the tab size
: Set softtabstop = 4
: Set autoindent # Automatic indent
: Set cindent # Automatic indent in C language format

Move the cursor:
    Up: k nk: Move n rows up

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.