vim--'s beginner to take a few steps

Source: Internet
Author: User
Tags save file

(Disclaimer: This article is for Linux users such as Ubuntu)
Three modes used by VIM:
1. General Instruction Mode
2. Edit mode
3. Instruction-column Command mode

Vim's easy steps to walk:
Simple command: (I think it's better for beginners to put it in front)
Ctrl+d Show all commands for the current initials (this works)
<TAB> command Pang (better use, write the first few letters directly TAB to help you fill up the content you want to write)
:!ls or:!dir View files that exist in the current directory
: E Back to start directory
Help user-manual don't know.

Direction: H, J, K, L, left up and down right (or directly press the keyboard direction key can also)
Insert class: I current cursor insertion
: q! Discard Current Changes
: Wq save File and exit
: Vim file edits the specified file using the VIM editor

Commands and objects: operator + action
Delete class: D delete operator
: DW Deletes the current word to the next word (both the line and the line start at the cursor)
: De deletes this word
: Delete from head to tail, whole line
Search Class Command:
/+ String lookup (reverse lookup)? + string
% pair Brace Lookup

Use Count to specify an action: Entering a number before the action causes it to repeat multiple times
Input: 2w Move the cursor forward two words
3e move the cursor forward to the end of the third word
0 move the cursor to the beginning of the line
Operator class:
: E causes the current cursor to move to the end of the word
: Y copy text
: P Pastes the previously copied text

Set command options:
: set+ content, setting content

Replace command:
: s/old/new/g can replace old to new

To create a startup script:
1.:EDIT-/.VIMRC Edit VIMRC File
2.:r $vimruntime/vimrc--example.vim Reading sample files
3.:write Saving files

To delete a file:
!RM Test Delete test file



This is a study of vim after the summary and record of the section, the detailed section please check the VIM documentation, there are deficiencies please feel free, but do not like to spray!




vim--'s beginner to take a few steps

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.