Recently I am learning to use gvim. The operating system is ubuntu. gvim has many useful plug-ins, such as taglist, bufexplorer, and winmanager. These plug-ins can be downloaded from www.vim.org. Copy these plug-ins (*. Vim) ~ /. Vim/plugin
Summary of common replacement modes in vim.
1. Simple replacement expression
The replacement command can replace another word with one word in the full text:
: % S/four/4/g
The prefix of "%" indicates that replacement is performed in all
ESC: This is one of the omnipotent function keys in Vim. Basically, pressing this key at any time can return the normal state of vim.
I: In normal state, you can press I to enter the "insert" Edit state. At this time, press the direction key to
H left, backspace, or direction keyJ, enter or + (shift key required), or direction keyK, or direction key or-(shift is not required)L right, or space or direction keyThe hjkl key is used to move your hands away from the typing area (in the center
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
Anyone who has experience using and configuring Vim knows that Vim can be comparable to ide after configuration ~
However, it is also very troublesome to configure Vim. Many times, when we need to change the system or back up data to other
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
Lookupfile is indeed an unparalleled file search plug-in, but one problem has not been solved. After the query window is called up, enter the file name. After several matching files are found, you can only press Ctrl-N to move up and down. If I
The use of various major Editors is not satisfactory. notepad ++ is recommended by many people, but zencoding is too stingy. For me, other reasons such as the UE startup is too slow.
You have to use the following artifacts:
Download vim,
Http:/
Sometimes, copy text (especiallyCode) To vim, the format will be disordered. It seems that automatic indentation is a curse. This article does not go into the cause and provides a solution.
1. paste Mode
Run the following command to enter the
1. VI Operation ModeVI provides two operation modes: input mode (Insert mode) And command mode (Command mode). In input mode, you can enter text. In command mode, you can perform various editing actions, such as deletion and modification.
In input
Move the cursor
H j k l key:
Number Parameter 4l move 4 characters to the right
Move cursor paragraph0 beginning and end of $W moves to the right based on the distance of a wordB moves to the left based on the distance of a word.
I insert the
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
Download link taglist_45 ctags-5.7.tar vimcdoc-1.6.0 (taglist ctags Vim Help)
1. ctags:
Download ctags-5.7.tag.gz
Tar xzvf ctags-5.7.tag.gz
CD ctags-5.6
./Configure
Make
Sudo make install
The directories may be different during
ArticleDirectory
Character Deletion
Delete words
Delete row
In this section, let's take a look at the deletion. The deletion command is relatively simple, but to make the deletion more efficient
You need to work with the
Vim/gvim character encoding in Chinese Windows has two problems:
No encoding detection function by default
If a file uses a Character Set Larger than GBK (such as UTF-8, UTF-16, gb18030), then the corresponding characters in the GBK will
The help entry for the commands used in this section: : Help helptags
: Help taglist.txt
Use the following command to generate a Help Tag
: Helptags ~ /. Vim/doc
The following describes commonTaglistConfiguration options, you can configure
1. Convert Enum in C language to Java constant:
G/^ \ s * $/dG/^/S // public static final int/
Leti = 1000G/,/S // \ = '. I.'; '/| let I = I + 1
2. # define macro in C to convert Java constants:
% S/^ # define [A-Z, 0-9, _] * \ Zs \ s \ ze/=/
In vim, there are four encoding-related options:Fileencodings,Fileencoding,EncodingAndTermencoding. In actual use, any option error may cause garbled characters. Therefore, each Vim user should clarify the meaning of these four options. The
Document directory
1. Basic replacement
2. You can use # As the separator. The/in the middle will not be used as the separator.
3. Delete ^ m from the file
4. Other skills
Programs that use the Linux environment for development often compete
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.