The global command can be used to format the EX command on the matching line in the specified mode:: [range]g[lobal]/{pattern}/[Cmd]range-is the execution range (if default, is%) Global- command keyword pattern- match content cmd -ex command
New VIM script to automatically add author information (script)Vim/etc/vimrc################### #尾部添加以下代码 ###############################Map ms:call addauthor () ' sfunction Addauthor ()Let N=1While n Let line = Getline (n)If line =~ ' ^\s*\*\s*\s*
New to the MBP high with a week, good to tears, thanks to mommy first ...============================================================================So, let's put the VI configuration first ...======================================It was readonly to
If you are looking for the ability to configure the Vim plug-in, then please look down and read it.With VIM has been three years, has never been a serious configuration, has been using a can use the configuration, highlighting, line number these.
Vim and VI usage are basically the same, Vim is more powerful, and there are color markers. Vim is used, VIM has three modes are general mode, edit mode, command mode.
General mode: Delete, copy, and paste
X: Remove BackwardX: Delete
Two modes-edit mode: You can perform normal editing operations at the bottom left--INSERT-- "input i in command mode to enter edit mode"-Command mode: You can press ESC in edit mode by clicking on the command in the bottom left. Ability to
One, vim repeat command 1. Repeat the last commandIn normal mode . (decimal point) means the last command operation is repeatedCopy test files to a local directory$ cp /etc/protocols .Open a file for editing$ vim protocolsNormal mode input x ,
Three modes of VIMGeneral modeIn this mode, you can: move the cursor up or down, delete a character, delete a row, copy, paste one line, or multiple lines.Cursor movement in general mode
h or LEFT ARROW key
The cursor moves one
First use VIM to open the file that needs to be edited or viewed in binary format, not using the-B parameter sometimes results in a conversion error, as described in the post-divider section.Vim-b File-to-open.datThen use XXD to convert the file
1.ctags(1) to http://ctags.sourceforge.net/download Ctags source code ctags-5.6.tar.gzHttp://prdownloads.sourceforge.net/ctags/ctags-5.6.tar.gz(2) Unzip and installTar zxvf ctags-5.6.tar.gzCD ctags-5.6./configure && make && make install(3) Use[/home/
Vim is one of the most commonly used full-screen editors in Linux and operates in three modesedit mode : Also called command mode, provides basic operations on text, such as moving up and down, and so on.Input mode : As the name implies, input
[[email protected] biji]# vim + 1.txt Open the file, the cursor is positioned to the last line[[email protected] biji]# vim +5 1.txt Open file, cursor to line 5th[[email protected] biji]# vim +/nobody 1.txt Open the file, the cursor is positioned to
Replace command format
• Command Format: [Replace-range] s/replace-pattern/replace-string/ [c,e,g,i]• Command Description text replace range , in general form, is [M,n] , which indicates that the text between rows of M
Vim is a well-known, powerful, highly customizable full-screen text editor similar to VI.Usage: VIM [parameters] [file:] Edit the specified fileOr: Vim [parameters]-read text from standard input (stdin)Or: Vim [parameter]-T tag edit file at tag
In command mode, the first execution of GGThis jumps to the first line of the file.Re-execution: DGThis clears the entire file!There is also a way to exit vim and then use echo >> file to quickly clear the contents of the file, but you can also
^ Represents the beginning of a line, and $ represents the end of a row. GG document header, G document footer.Here is the basic command for VIM copy and paste:yy duplicates the row where the cursor is located. or uppercase one Y.2yy or y2y copy two
One, Text editor : Vi,vimAscii:UTF:File Editor Categories:Full Screen Text editor:NanoVi,vimEmacsText Editor:SedVI--->VIMPatterned editors: A variety of different modesEdit mode: Command modeInput mode: Insert modeLast-line mode: Vim has many
Start using Vim (i) vim被称为是编辑器之神,如果可以学好vim的话,就可以在键盘上 “健指如飞” 了,可以完全摆脱鼠标来进行文本的定位编辑。 当然,vim还可以进行各种配置,装上各种插件,做成 IDE ,会有很炫酷的感觉,而且做为 伟大 的软件工程师,能在键盘上 刷刷刷地,灵活地超控自己的代码也是一种非常值得 自豪的事,所以,我觉得,掌握 vim 是做为一个计算机方向专业的人的基础课程,很有必要去接触一下 vim 这个“编辑器之神”。
These two days, vim learning has encountered bottlenecks. Vimtutor after reading, although there will be a lot of basic operations, but with the deepening of learning, more and more problems. According to Vimtutor's instructions, the next step
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