General Mode : Enter the "Vim file name" in the Linux terminal to enter the general mode, but cannot enter the text.edit mode : Press I in general mode will enter the editing mode, you can write the program, press ESC to return to the general
1. Switch the insert mode:In command modeInsert after a cursorInsert at the end of the row where the cursor is locatedI start inserting before the cursorInsert at the beginning of the line where the cursor is locatedO insert an empty row after the
Because the newly installed Vim/VI does not enable the code highlight configuration by default, we can see that some friends go online again and again to find various configurations. In fact, VIM only copies the configuration file samples by default.
As Vim is used more and more, we feel the power of VIM. For example, we need directory browsing recently. So we searched for related things and found a lot of knowledge on the Internet, however, it is complicated, so you just need to spend some time
1. viminfoVim automatically records the operations performed in vim and stores them in ~ /. Viminfo file. In this way, the cursor is automatically displayed at the last exit when Vim opens the file. The previously searched string is automatically
############# Buffer zone: E (: Open) Open the New Buffer: Ls (: buffers) list all buffers in the list/BS/BV/be (burexplore shortcut): Buffer 2 switch Buffer: Bnext/BN (CTRL 6) Next Buffer: Bprevious/BP top Buffer: Bfirst/BF first Buffer: Blast/BL
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
Download
Wget http://www.vim.org/scripts/download_script.php? Src_id = 19574-O taglist.zip
Then decompress taglist.zip ~ /. Vim/directory
Use the following command in VIM to switch the taglist display.
: Tlisttoggle
Use Ctrl + W to
Vim has powerful replacement and search functions. If you can use it skillfully, You can greatly improve your work efficiency.
Replace
Syntax: [ADDR] S/source string/destination string/[Option]
[ADDR] indicates the search range, for example:
"1, N":
Time: 2014.08.06
Location: dormitory
Bytes -------------------------------------------------------------------------------------
We decided to set up the vim environment tonight, mainly through various plug-ins, and then we can live a happy life.I.
There is no doubt that Vim is profound and profound. Here we will share some tips about vim, which I discovered today, because I just switched to VIM soon, I am not familiar with many functions of VIM, but I still have some configuration items on
Chapter 1
First, we put forward the idea of VIM: how to improve reuse -- easily repeat previous operations.In addition, the author divides Vim operations into two steps:
One is mobile, and the other is operation.
For these two aspects, the
The purpose of this article is to summarize some practical and regular Vim commands in daily operations, instead of introducing some basic Vim knowledge, such as several insert modes, hjkl mobile commands, and DD to delete this line, P paste and so
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
Use vim (II): common functions1. Common vim functions: common functions of vim, including block selection, copying, multi-file editing, and multi-window functions. 2. Select the vim block to copy and paste a part of the document without processing
Xin Xing and you disable vim's automatic backup function
When we use gvim to edit a file, ~ If we do not want to automatically generate a backup file when editing the file, we need to modify its configuration file, but I did not find the
How Xin Xing helps you with vim's third-section mobile technology that programmers need
First of all, 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
How to troubleshoot UTF-8 file garbled characters in VIM
1. Basic KnowledgeIn Vim, there are four encoding-related options: fileencodings, fileencoding, encoding, and termencoding. In actual use, any option error may cause garbled characters.
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