Linux Learning Notes (17) Vim

Source: Internet
Author: User
I. Introduction of VIM
Vim is an upgraded version of VI
is the vi with color display
Divided into general mode, edit mode, command mode.
yum install -y vim-enhanced
Install Vim
Use VIM to open passwd after installation is complete
vim /etc/passwd

And before with the VI open there are obvious differences, vim with color display,
Second, Vim color display and move the cursor
Move the/etc/passwd to/tmp
vim/tmp/passwd
Found and no color display

Vim color display is related to file's path, file content
Vim/etc/vimrc
You can edit vim's configuration file,
First we find a file to practice vim

cp /etc/dnsmasq.conf /tmp/1.txt

I am suggesting here that the/etc/dnsmasq.conf file does not exist,

Run the above command after installing DNSMASQ, and then copy the file

And then

vim  /tmp/1.txt


First enter the number and then the arrow key can move the n characters left or right or move n rows up or down

U is redo last operation, up to 50 times
Ctrl+r is an anti-recovery, such as multiple press of U, you can use Ctrl+r to restore the next operation
V can move the cursor to select the copied range, X can be cut, and then paste with P

Linux Learning Notes (17) Vim

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.