Introduction to VIM (ACM version)

Source: Internet
Author: User
Tags first string

Sometimes tools are too powerful, but getting started is difficult.
Vim Command Daquan
This is the existence of VIM .
In order to exercise the ability of the naked eye to debug and write the correct code, I decided to write code with a text editor.
Because the main problem is to write ACM at this stage, it does not use special advanced features.
1. Configuration

打开配置文件 vim ~/.vimrcset nocompatibleset backspace=indent,eol,startset cursorlinesetonset tabstop=4set shiftwidth=4colo eveningset mouse=aset cin使用 g++ A.cpp -o A./A

When editing, you will be able to make simple commands.
Move
HJKL Lower left upper right
W e W e b b The next word first (tail) next string header (tail) the first string of previous words
In line 0 ^ $ g_
Between rows GG NG
Sentence () previous sentence (end) {} Last paragraph (tail)
Copy y
Delete D
Paste P
Find * #/pattern
Replace
: [Range]s/pattern/string/[c,e,g,i]
% represents global 1,10 1 to 10 rows g means that the row is all replaced
\ < Sky \ > Only replace Sky does not consider the internal situation of Askyaa
If it is only delete//
Replace
Comment Block selection I//ESC
Layout block selection =

Introduction to VIM (ACM version)

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.