Simply put, after centos6.3 is installed on a virtual machine, the configuration file without the vim editor is used by default. If necessary, you can customize or configure your vim editor as you like:1. If you have the root permission, go to the
Vim replacement character:Syntax: [ADDR] S/source string/destination string/[Option]Global replacement command: % S/source string/destination string/g[ADDR] indicates the search range. If it is omitted, it indicates the current row.For example, "1st"
vimball is a Vim plug-in that can help you easily install the plug-in VBA format. install vimballfirst, download it, and decompress it to the same directory as gvim.exe. It seems that Vim has vimball, so that the installation can overwrite the old
1. Vim open the document:
Vim document name open document in Normal Mode
VIM + N document name after opening the document, locate row n
VIM: Enter the vim interface and run the command "E document name" to open the document. This
~ /. Vimrc // Vim environment script~ /. Viminfo // Vim logon information: Set nu: Set Nonu // set whether to cancel the row number : Set hlsearch: Set nohlsearch // hight light search // whether to whitelist: Set backup // whether to automatically
Vim configuration file "Display row number set nu" hidden assistance prompt set shortmess = ATI "syntax highlighting syntax on" using Vim keyboard mode "set nocompatible" No need to back up set nobackup "not saved or file when read-only, the pop-up
Syntax: [ADDR] S/source string/destination string/[Option] global replacement command: % S/source string/destination string/g
[ADDR] indicates the search range. If it is omitted, it indicates the current row.For example, "1st" indicates the number
Vim program editor
1. first introduce the VI Editor
VI is divided into three modes: general mode, edit mode, and command line mode.
Open the file and enter the normal mode.
When you press any letter of "I, I, O, O, a, a, R, R, press [ESC ].
In
1. Disable the VI consistency mode.
set nocompatible
2. How to configure backspace
set backspace=indent,eol,start
3. display the row number
set number
4. Set to display the cursor row and column information in the lower right corner of the editing
I used it a few years ago, but later I became unfamiliar with it. I can't summon up the courage to pick it up again... I have to use it today. Now that I have picked it up, I will record it well.
Introduction and Installation
Ctags is an
1. Split screen to start Vim1. Use uppercase o parameters for Vertical Split screenVim-on file1 file2...2. Use lower-case o to split the screen horizontallyVim-on file1 file2...Note: N indicates a number, which indicates several screens.2. Disable
In VI, moving the cursor and editing are two things. Because they are distinguished, you can easily perform optical calibration.It is useful to move the cursor a little faster. The C-representation in the text is Ctrl, case sensitive. Cursor
It is worth mentioning that the PDF version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the download fails on the left, you can also enter the following address in the browser to download: http:/
1. Common Vim Functions
Common functions of VIM, including block selection, copying, multi-file editing, and multi-window functions.
2. Vim Block Selection
Block Selection is to copy and paste one part of the document without the entire line of
Reference: http://xw2423.byr.edu.cn/blog/archives/232
Http://www.pythonclub.org/linux/vim/visual-mode
Vim's multiline editing skills are all in "visual mode.
You can enter visual mode in three ways:
1. V select by byte
2. V select by line
3.
1. move the cursorUpper: KLower: JLeft: l "letter l lower case 』Right: HFirst line of the previous line:-"minus sign 』First line of the next line: +First line: 0 "number 0 』End of line: $Word tail or the last word tail: ENext word: WFirst or first
Use vim (III):. viminfo and. vimrc1. viminfo's operations in vim will be automatically recorded by vim and saved in ~ /. Viminfo file. In this way, the cursor is automatically displayed at the last exit when vim opens the file. The previously
Vim-) while confirming and searching for replacement
When performing simple global search replacement, you can use the following ex command:
: % S/which/what/g
It is easy to use
%
Each row (everyline)
S
Replace
Xin Xing is playing with you on the Operations text in vim section 4.
It is worth mentioning that the pdf version of my vim tutorial has been completed. You can download it. Here is the download of csdn: csdn. If the download fails on the left, you
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