1. Enter Command mode. Vim's command mode is to enter ":" in edit mode, and the cursor jumps to the last line of the screen, where the colon is displayed, and the command mode is entered.
The contents of the command mode are displayed on the last
yy copies the entire row of the cursor's row. or capitalize a Y.2yy or y2y to copy two rows. Sunglass, please extrapolate well. :-)y^ is copied to the beginning of the line, or y0. Does not contain the character where the cursor resides.y$ is copied
1. Cursor movement
L
Move one character to the right
H
Move one character to the left
W
Move one word to the right
W
Move right One blank separator word
B
Move one word
My Vim IDE Interface:
1, install VIM and vim Basic plug-in
First install VIM and vim Basic plug-in. These can be installed using Apt-get:
Lingd@ubuntu:~/arm$sudo apt-get install vim vim-scripts vim-doc
The vim-scripts is a few of Vim's basic
Vim Plug-in list
Warehouse Address Basics
Plug-in
Use
gmarik/vundle, L9
package Management
the-nerd-tree
directory tree
Ctrlpvim/ctrlp.vim, Dyng/ctrlsf.vim
Quick
Ubuntu VIMRC settings are available for Ubuntu and Fedora Systems, and other systems are not validated.
Vim configuration files in Ubuntu are stored in the/etc/vim directory, with the configuration file named Ubuntu VIMRC
The configuration file
1. Display TAB key
You can't see the TAB key in the file. To show it:
: Set list
Now the TAB key is displayed as ^i, and $ is displayed at the end of each line so that you can find out where whitespace characters may be ignored by you.One drawback
00 PrefaceLearning to program under Linux is the first thing to learn to use VIM, and to skillfully use vim can greatly improve the efficiency of writing code. is so-called AX, for this I refer to a few blog will be commonly used vim operation
You can undo one operation by pressing u in VIU undo the last step operationCtrl+r Redo the previous undo operationAttention:If you enter "U" two times and your text reverts to the original, it should be that your vim is configured in VI
Create a new VIMRC in the user's home directory. For example:Vim ~/.VIMRCthen you can copy it in. The configuration is as follows:"turn off VIM consistency principleSet Nocompatible"Show Line NumbersSet number"sets the row and column information for
First, move the cursorH,j,k,l, down, left, right.CTRL-E Mobile PageCtrl-f up a pageCtrl-b down one pageCtrl-u Half Pagectrl-d down half a pageW Jump to the next word, split by punctuation or wordW jumps to the next word, long jump, as end-of-line is
One, vim toolsVim is an upgraded version of VI, VIM with color display, divided into general mode, editing mode and command mode1. Install Yum install-y vim-enhanced2, Vim color display is based on the contents of the file display, its configuration
5.5 Entering edit mode5.6 VIM Command mode5.7 Vim PracticeExtendedSpecial usage of vim http://www.apelearn.com/bbs/thread-9334-1-1.htmlVim Common shortcut key summary http://www.apelearn.com/bbs/thread-407-1-1.htmlVim quickly deletes a character
God operation
Writing code in vim often comes across multiple lines of comments and uncomment, and in VS we can use the default shortcut keys or customize shortcuts in settings to solve this problem.
Since Vim is so powerful, it must also
Directly go to the topic:
Basically, VI is divided into three modes: general mode, edit mode, and command mode. The functions of these three modes are as follows:
Normal Mode: open a file using vi and directly enter the normal mode. In this mode,
Via: Kevin Watters's blogTranslation: xguru
Original StatusI have watched a violin player play with great passion. I have this idea: Maybe I have invested almost the same number of brain cells in the text editor as I have played a favorite
No matter how many files you have to edit, you can process them in vim. You can define a list of files to be edited, switch from one file to another, or copy and paste between different files.
A. Edit another fileB. File ListC. Switch to another
The following are the settings used for C/C ++ programming using vim and common operations.
First, we need to cut the actual Vim image at work:
1. Display Settings
Add the following to the vim configuration file/etc/vimrc:
Set cindet # Set to C
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