Vim Program Editor

Source: Internet
Author: User

0. Mnemonic Chart

1. Use of VIM

Part I: General mode available button description, cursor movement, copy paste, search substitution, etc.

Part Two: General mode switch to edit mode available button description

Part III: General mode switch to instruction column mode available button description

2. Additional features of VIM

(1) Block selection (Visual block)

(2) Multi-file editor

(3) Multi-window editing

(4) Vim environment setting and recording: ~/.VIMRC, ~/.viminfo

<1>vim will take the initiative to record the behavior you have done, so that you can easily work the next time! That record
Record action of the file is: ~/.viminfo! If you've ever used vim, your home directory should have this file.
This file is automatically generated and does not have to be built on its own. And what you've done in vim, you can look inside this file.
Inquiry

<2> overall Vim's The setting value is generally placed in/ETC/VIMRC this file, however, it is not recommended that you modify him! You can modify the ~/.VIMRC file .

(The preset does not exist, please build it yourself!) ), write the set value you want!

Common setpoint: (no colon effect is the same in the ~/.VIMRC file)

(5) Chinese coding problem

Here are a few questions to consider:

1. Your Linux system is supported by default language data: This is related to/etc/sysconfig/i18n;
2. Your terminal interface (BASH) language: This is related to LANG's variable;
3. The original code of your file;
4. The software that opens the terminal, such as the window interface under GNOME.

In fact, the most important thing is the third and 4th, as long as the two points of the code consistent, you will be able to correctly see and edit your Chinese
file. Before the Linux native Tty1~tty6 originally did not support the Chinese encoding, so do not consider this problem !

(6) DOS and Linux break characters

  The break characters used in DOS are ^m$, which we call the CR with LF two symbols. Under Linux, there is only the LF ($) Break symbol.

Break Format Conversion Command:

  

(7) Language encoding conversion

  

Example: Convert Traditional Chinese utf8 to Simplified Chinese UTF8 encoding (big5 Traditional Chinese code, gb2312 Simplified Chinese code)

  

Vim Program 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.