When writing a configuration file, often forget to switch to root, resulting in file editing, typing: Wq exit save, appear E212: Unable to open and write file error prompts. This is due to the fact that the current user does not have write
1, astyle Format code
Install Astyle and add the bin directory to the environment variable in VIMRC add the following setup code
"Call the Astyle program, do the code beautification
func codeformat ()
" Get the current cursor at the line
"Ctags function":
Generate index files for source variables/objects, structures/classes, functions/interfaces, macros, etc. for quick positioning. There are currently 41 languages supported, only for example C + +: Ctags can produce index files of
I
a/a
o/o
R +? Replace
0: The beginning of the current line of the file
$: End of current line of file
G: The last line of the file begins
1 + G to the first line
9 + G to line Nineth =: 9
DD: Delete a row
3DD: Delete 3 lines
YY: Copy a row
3
Vimgrep is a tool with Vim, which is similar to the use of grep. For example, to find word in the current directory, use the following:
1
: Vimgrep Word *
If you want to recursively look up all the subordinate directories,
Developed under Linux, Vim is the preferred tool. However, vim, which is installed by default on the system, usually does not match some of the regular settings. such as: color display, highlighting, automatic indentation, automatic memory, tab step
In Vim there is also the operation of the automatic formatting code, like the CTRL + Shift +f in Eclipse, which, although very powerful, usually destroys the original indentation of the Code,
So it's not recommended to use in a language such as
1. Normal mode (Normal-mode)
The default is in normal mode when Vim is started. Regardless of the mode, press the key (sometimes required to press two) to enter normal mode.
2. Insert mode (Insert-mode)
Pressing I, I, a, a, and so on in normal
No: Drop the option before a Boolean option, such as set number, set Nonumber custom vim:: Edit ~/.VIMRC Add your own command at the end of the command line, such as highlighting search results move the cursor H J k L Delete Delete whole line DD
This shortcut key is used in command-line mode:I means go into edit mode and operate at the cursor location.YY Copy the contents of the line where the cursor is5yy the contents of the next 5 rows, including the line where the cursor is copiedP
Vim's working mode is first to know:In command mode, enter I a o:A insert after the character where the cursor is locatedA at the end of the line where the cursor is insertedI insert the word match either the cursorI Insert at the beginning of the
1:vim Three mode command mode insert mode command extension modeThe 2:vim registers have 26 named registers and a nameless register"TP paste" "Ayy Sticky to register aYY non-specified registers2: Open file in binary modeVim-b Binaryfile%! Xxd into
Transferred from: https://www.cnblogs.com/yangjig/p/6014198.htmlIn the command state, use = = for the current row (double-click = two times), or n== (n is natural number) for multiple lines, to automatically indent the following n rows from the
I have read several installation methods from the Internet, but they are not clear enough, and the README of this project is too simple. As a result, the plug-in has been successfully installed for a long time.1. Install pysmell
Python Installation
Transferred from: http://blog.sina.com.cn/s/blog_98cf2a6f01015b220.html, thank you !!1. Three Modes of survival: insert mode, command mode, regular mode I -- move the cursor to insert mode A -- move the cursor to insert mode ESC -- return to normal
Where is the configuration file?
When using vim, you need to know a series of configuration files. The location of these configuration files depends on the installation location of vim and the operating system you are using.
Generally, there are
In the past two days, I want to write a large amount of code in Linux. I heard that VIM + csinsight can implement functions similar to sourceinsight, and it took me half a day to learn how to use csinsight.
1. Prepare VimVim -- version | GRPECscope
Configure Vim on your own virtual machine. I don't know how to use a lot of data on the Internet. I personally think it is better to add one. Below are some of my simple configurations, which are enough currently. Wait for what to use, and then
A good tool can greatly improve the efficiency when reading the source code. Here, I will not talk much about the tool, VIM + ctags + cs.pdf. Here I mainly want to introduce some of the usage skills of this tool combination. I have found it on 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.