Linux Environment Programming-editor Basic operation

Source: Internet
Author: User

Vim Use

New file

#vim hello.c

Insert mode

Press the I key, the bottom appears--insert--

Line break: Press ENTER

Delete character: press X in normal mode

Delete whole line: press DD

Redo Delete: Press U

Cancellation command: Ctrl+r to u consequences make up

Copy: Y y2w copy 2 word y copy contains trailing space yy copy line

Paste: P

Exit Save: Press ESC, enter: WQ

Quit without saving: Press ESC, enter: q! Note There's an exclamation point ending

Find::/find Content

Specify line:: 5 Press Enter line 5th

Indent: Enter at current line: Re-enter: Set cindent shiftwidth=4 and then enter, so the next line presses the space bar according to the set indent input or the edit mode.

Tab Space Quantity:: Set tabstop=2

Show line numbers:: number

VIMRC the configuration file.

Note Files edited under Windows to Linux under the conversion command: Dos2unix file name

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.