VI (VIM) is a very popular editor on Linux, many Linux distributions are installed by default VI (VIM). VI (VIM) command a wide range but if used flexibly will greatly improve the efficiency. VI is "visual interface" abbreviation, VIM is VI improved
Before you start writing plug-ins, you need to verify that Vim supports Ruby by using the following command to identify:
$ VIM--version | grep +ruby
If the output is empty, your current vim does not support Ruby, you need to recompile,
Objective
Vim is Linux under quite a piece of text processing artifact Also, is VI Editor upgrade version, the full name of the VI improved. and VI is the abbreviation of visual interface, they are processing ASCII character data, skilled use of
Recently on personal blog http://foocoder.com will introduce a vim plug-in every day, think of the garden has not been updated for a long time, but also to update an article.
Today, according to the request of the reader, introduce the next text
Vim is very powerful. It can be viewed by man vim (the man is the manual that looks at the command, and the man plus the commands to see the usage)
Below is a simple description of the following simple VIMRC configuration
Look at the
Vi/vim Basic Use MethodThe VI Editor is the standard editor for all UNIX and Linux systems, and its power is not inferior to any of the latest text editors, here is simply a brief introduction to its usage and a small number of instructions.1, VI of
The P key is pasted after the cursorThe P key is pasted before the cursorV to enter line visual mode, after which you can select text by rowM key to place tag, followed by A-Z to name tag' Key (reverse single quotation mark, above Tab key) followed
Why should I learn vim?
All Unix like systems have their own VI editor
Some software's editing interface will automatically adjust the VI
As an upgraded version of VI, VIM has the program editing function, but also has the code
vim most general editor commands command very much, only need to master the following some of the commonly used, basically fully enough.The most concentrated of the essence.Vim Insert mode Command mode edit mode : Set number sets line numbers: Set
Multi-line Comments:1. Enter command-line mode, press CTRL + V to enter Visual block mode, then press J, or K to select multiple lines to mark the lines that need comment2. Press the capital letter I, then insert the comment, for example//3. Press
Move0: Number 0, move to the beginning of the cursor$: Move to the end of the line where the cursor isInsertI insert from the cursor without overwriting the contents of the followingA prompt insert from the next word in the cursor positionA is
FRM: http://www.linuxidc.com/Linux/2013-05/84031p2.htm
Learn about the three basic modes of VIMWhen we finish installing an editor, we will definitely open it and then enter something in it, but after you open vim, you want to enter something
Just installed Vim, perhaps the interface is not very friendly, which requires us to change the vim configuration file, according to our needs to modify it.Under command line, enter the command:sudo vim/etc/vim/vimrcYou must add sudo, otherwise you
Noremap Non-recursive mode (recursive mode refers to map a C if map a B is first and map B c)Nmap Normal ModeVmap Visual modeIMAP INSERT modeCMAP command-line modeOmap operation mode (enter operation mode when the first operation of the input
Referenced by: http://blog.csdn.net/hzhsan/article/details/44228241Open Vim ~/.VIMRC in terminalThen add:Set Hlsearch #设置高亮显示搜索结果nnoremap \h :nohlsearch #定义一个映射For example, Vim xxx.pyThen/with #搜索with这个字符In the result, with will be highlighted,
This article transferred from: Http://www.jianshu.com/p/b8763c23ea64Basic settingsThere are two ways to set up certain and columnsSet Cursorcolumn Set Cursorline " or Set CUC Set CulI recommend that you use the first way , so that you can see the
Vim mode switchingWhen you turn on VIM as the default command mode, do the following to edit:Input IAfter editing, press the ESC key, enter:, enter the last line mode, enter Wq, save to exit, q! Force exit.Common commands: command-line mode
Makefile Rules:[email protected]: target file$^: All dependent files$-C: Output target code, do not output executable file-G: Compile the compiler to provide information later on the program debuggingTarget:rulesGcc-o [email protected] $^InstallCP
Install vim in Ubuntu is relatively simple. Use the following command:Sudo apt-get install vimThe system will automatically install vim. Now there will be two kinds of editors in the system. One is the built-in nano editor, and the other is the
I have always wanted to change to emacs, but it is hard to work efficiently, so vim has not completely abandoned it. My colleagues who want to be python may have the same troubles:When maintaining others' code, it is found that many tabs and spaces
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