Operator+motion=actionIn vim, d{motion} commands can delete a single character dl , or you can delete an entire word daw , the entire paragraph dap . The same can be used c to change words caw or exercise with commands cap . ycommands are similar to
The first vim file mode is the basic mode, you can move the cursor to view the file.Insert mode:Press I into the insert mode, you can write something, need to save press: W, need to save and exit Press: Wq.Then press ESC to go back to basic
When you perform some repetitive commands in vim, you can replace them with some shortcut keys. List below
After you edit the text and exit to normal mode, . repeat the last change operation, and if you press it more than once . , we can use
Find and Replace by HandIn the text above, we are going to change the content to Word copyMaybe we can use the following command.:%s/content/copy/gThe above command changes all the content words in the text to copy, but we do not want the content in
The recent use of VIM's regular replacement feature is very powerfulA file:1,2,34,5,61,2,34,5,61,2,34,5,61,2,34,5,61,2,34,5,6Now you need to delete the contents before the comma, then in the vim-typed command::%s/.*,//gThe resulting results are: 3
Vi-vim Editor: Full screen editor, modal editorVim mode:Edit mode (Command mode) Input mode Last-line mode (bottom-row mode)Mode conversion: Edit mode--Input mode: I: Enter in front of the character where the
Text substitution in vim: 1. Replace the contents of the current line: :s/from/to/ (S is substitude) :s/from/to/ : replaces the first from in the current line with a to. If the current row contains more than one
I often use a manual folding method, which is: Set Foldmethod=manualThe commonly used folding commands for VIM are:ZF: Collapse the selected rowZo: Open collapseZR: Open All foldsZM: Close all foldsZD: Delete collapsedMy personal most commonly used
Vim is a reinforced version of VI, it is recommended to use VIM.Vim has three different modes:Command mode (normal mode)After Vim starts, it enters command mode by default, and any mode can be returned to command mode by ESC. Command mode can be
First, with a good system to bring software Ctags most of the UNIX system has ctags software, it can work well with vim. Purpose: Generate C language tag file, implement the jump between related C files. Usage: 1. Generate the label file in the
Trace Your Selection with Precision Text ObjectsFor brackets, quotation marks, and so on, such as the labels in Html,xml, are paired, Vim can understand this structure, and select the text of their restricted area.For the following JS codeExecute
Delete Lines containing a PatternCombining the :global and :delete commands allows us to cut down the size of a file rapidly. We can either keep or discard all lines that match a {pattern} .:globalthe Combine and: Delete command allows you to
Search to NavigateAnother way to quickly locate somewhere in Vim is to search for word using the symbol/followed by word you want to search, as follows:It can be seen that multiple matches are displayed after the command is executed, and we can use
Recently bored, suddenly want to play with Tianchi data mining, found that the data is big, want to switch to MySQL database, phpMyAdmin import when importing wrong! Data file Big! So, ready to intercept a small piece to another file test first,
Syntax on "highlight" colo torte "color set guifont=microsoft_yahei_mono:h11" font Set lines=26 columns=93 "gvim window Size" Set NU "line number switch set history=100000" Max historical set Autoindent "Auto indent set
The use of Vim to browse the C/s code can be generated with ctags tag file, so it is convenient to jump to the function definition of the place, this function almost all the graphical interface editor, such as Vs,source insight and so on, but Vim's
1,move command
: M 13
Move the line where the current cursor is located after 13 rows
: M 0
Drop the line where the current cursor is located before the first line
: M $
Drop the line
Join talkVim (13th back: Vim method summary)
Hello, everyone. You are welcome to join in to hear the story of Zhang huiti: Vim. The last time we talked about the removal of the dragon knife: Vim
Life knife method. In this case, we will not
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