Vim common commands are becoming familiar and commonly used configuration records

Source: Internet
Author: User

This blog record is my own learning of Vim's common commands in the process, the sequence of commands gradually familiar (some of the already familiar commands are not listed), the VIM editor itself has some settings of the record

1, G quickly switch the cursor to the bottom of the file

2, U undo the previous step of the operation

3. How to set the TAB key to 4 spaces in vim

A) after adding the following code in. VIMRC, restart Vim to achieve 4 spaces by pressing TAB:

Set ts=4  (Note: TS is an abbreviation for TabStop, set tab width 4 spaces) Set Expandtab

b) for a saved file, you can use the following method to replace the Space and tab:

tab Replace with space:: Set ts=4: Set Expandtab:%retab! spaces replaced by tab::set ts=4: Set Noexpandtab:%retab! Add ! is the tab that is used to process non-whitespace characters, that is, all tabs, if not added, only the tab at the beginning of the line is processed.

Vim common commands are becoming familiar and commonly used configuration records

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.