When we use VI or vim, if we want to display the row number, we may do this: switch to the command mode, enter SET Nu, and then press the Enter key to display it; and we are writingProgramSometimes, when you want to press the Enter key, the cursor
In VI/vim, you can use the: s command to replace the string.
: S/Vivian/sky/Replace the first Vivian in the current row with sky
: S/Vivian/sky/g replace all Vivian in the current row with sky
: N, $ S/Vivian/sky/Replace the first Vivian from
Copying the same text is particularly effective. In Windows, we are used to choosing text with the mouse.
In vim, you don't have to worry about it. You can even use the visual mode for operations, but skip this step.
In this section, I will talk
ArticleDirectory
Basic
Advanced
We have been using Vim intermittently for a year, and there will always be a few commands, with extremely low efficiency.
In the past few weeks, windows was replaced with Linux mint, which is
I have also learned Vim before, but I didn't use it any more. I forgot some things. Now I want to refresh vim and make up my mind to use it as the main editor in the future! The following are some of the materials I have searched for. On the one
Vim is a common text editing tool in Linux and UNIX.CodeAnd read code frequently.
But when Vim manages code projects, it is not convenient to use ide integrated development tools. Now we provide a Vim plug-in project that allows you to perform
From: http://blog.sina.com.cn/s/blog_498a6eeb0100v3km.html
Add the following in _ vimrc:
"Format XMLFunctionxml ()Set filetype = xml: % S/> \ r press ENTER : Normal Gg = G EndfunctionMap XML: callxml ()
1.0 0
I am in ~ /. The color topic used in vimrc is desert. Vim, but the # include and other pre-processed characters on my computer are always dazzling and cannot be clearly seen. So I want to modify desert. Vim. The steps are as follows:
1. Put desert.
I. Mobile:
H, J, K, L: Left, bottom, top, right.
W: the beginning of the next word.
E: the end of the next word.
B: the first word of the previous word.
<>: Indent the selected V mode.
Ii. Redirect:
%: You can jump between {}, "", (), and.
H, M, and
1. Configuration File Location/etc/Vim/vimrc
2. Change the configuration
set nocompatible does not use the VI default keyboard layout. If not configured, in edit mode, press the arrow key to enter characters. set nu display row number set
Vim allows you to place custom tags in the text. Run the "Ma" command to mark the current cursor position with. You can use 26 tags (A to Z) in the text ). These tags are invisible, but they are only remembered by VIM.
To jump to a tag you defined,
On the Linux server, VIM is used to editing configuration files and programming.
Generally, you need to configure the vim environment on your own to get a new server. Otherwise, you may not feel comfortable.
Vim initial configuration file
ArticleDirectory
Search options
Cut/copy/paste
KH l left and rightJ lower^ Move to the first non-space character in the rowW. Move a word forward and treat it as a word.W. Move a word forward without using symbols or punctuation
I have been developing in Linux recently.ProgramAlthough it is a running virtual machine, the encoding is still in windows and then compiled in Linux. I found this efficiency is relatively low. Why not encode it in Linux? Haha, the reason is that I
From: http://www.ibm.com/developerworks/cn/linux/l-tip-vim2/index.html
2.1. gzip (supported by compressed files)
Author:Bram moolenar
Website script No:None (included in the standard release of VIM)
Installation instructions:None
Function
1. Enter Vim to automatically open winmanager
This function is optional and can be set in vimrc:
"Winmanager is automatically enabled when you enter vim.
Let G: autoopenwinmanager = 1You can enable winmanager automatically.In winmanager. Vim,
: Ls list the buffer list
: Buffer #Open the file in the corresponding buffer area code: Bnext: Bprevious: Bfirst: Blast
: PwdShow Current Directory
: CD directory nameChange current directory
: E file nameCreate a file in the current directory
Run the vim command:
Vim filename: open or create a file and place the cursor at the beginning of the first line VIM + N filename: open the file and place the cursor at the beginning of line N VIM + filename: open the file and place the
Document directory
Basic
Advanced
In the previous section, we talked about the movement in VIM. Now that it is sufficient to be able to work in the screen and between the optical standard.
Now let's talk about the INSERT command.
I don't know
First, when installing vim (we recommend that you install it in the lab of our job University, first change the source, and see how to modify the source later ), enter sudo apt-get install vim-gtk directly in the command line. If you find that the
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