normal operation, f0s180MacroGrammar:Define Macros:1, Q{name}2. Recorded commands3, QUsing Macros:${count}@{name}// to generate a 100-row serial number // Enter text first 1 , // Start Recording // Qayyp (Ctrl + a) Q // Execute Macro // [email protected]Little TricksThese tips are in the "Vim practical skills", if you are interested in further reading study.Construct repeatable modificationsSuppose the cursor is on the character "H" at the end of the line, and we want to delete the word "nigh":
row 23 with bb: 12, 23 S/^/#/Add the first line from 12 to 23 characters #: % S = * $ = Delete unnecessary spaces at the end of all rows: G/^ \ s * $/D: delete all blank lines that do not contain characters (spaces are not included)
7. Delete more
XDelete the character under the cursor (abbreviated as "DL)XDelete the character before the cursor (abbreviation of "DH)DDelete from the current position to the end of the line (abbreviated as "d $)DWDelete from current position to start of
X Delete the character under the cursor (abbreviated as "DL)X Delete the character before the cursor (abbreviation of "DH)D. delete from the current position to the end of the row (abbreviated as "d $)DW is deleted from the current position to the beginning of the next wordThe dB is deleted from the current location to the beginning of the previous word.DIW deletes words on the cursor (excluding blank characters)DAW deletes words on the cursor (includ
beginning of the row at that position.
Run the command: marks to view all the tags.
If you only press ', you can jump between the last two tags!
"Is back to the last time when the file was edited.
You can use [and] to access the start and end positions of the last modification!
IX. Replace text
* Use cw or ce to replace the word with the cursor, and the effect is the same;
* If you press cc, replace the whole line directly. In addition, S can achieve the same effect;
* Press C = c $ to replace
text inside the {}
I
"" Inside the text
Let's say there's a line of text
I am a Vimer
We need to remove the word vimer.
$ (move to end of line)Daw (delete the word with the cursor and a space)
Finally get:
I am A
action commands for position range typesWhat is the position range? That is, from the current cursor, after a move command, the new cursor position between the text, such as 3j,10
Let's say there's a line of text
I
categories:
A type of text object, such as AW, AP
One type is the position range, such as L, j,k,f{char},$,^,0 ...
Action commands for text object types
Text Object
Operating Range
Aw
Add a space to the word where the cursor is located
Iw
The word where the cursor is
Ap
The paragraph where the cursor is
i
The text inside
i{
{}The text inside
rules of defensive programming
http://www.cs.berkeley.edu/~daw/mops/
BOON
C
Open source
Berkeley University
BOON is a tool for automatically finding buffer overrunVulnerabilities in C source code. Buffer overruns are oneOf the most common types of security holes, and we hopeThat BOON would enable software developers and code auditorsTo improve the quality of security-critical programs.
http://www.cs.berkeley.edu/~
need to match the actual access line; In addition, you do not have to select the 2 Pass vedio encoding option, which will not have any effect except to show a warning; Because most of the current network access mode is dial-up and DSL, so only need to generate 56k and 384k rate of video files; Finally, the recording of the finished video file, the name of the best date to identify, such as: 20060301.rm.
....................................
We can create a batch file called Shixian.bat to call
the word in the reverse direction.
B, dw: B: Return to the start of the word. dw: delete the word.
Daw: The cursor must be placed at the end of the deleted word. daw: All characters and spaces from the word to the previous one.
5. Select region vbo: the cursor is located at the end. This is a word that can be highlighted by vbo.
Veo: the cursor is placed in the word header. You can use veo to select words
row. Pay attention to this difference! Copy "Y $" to the end of the row.Copy and paste from the clipboard:Copy a row to the clipboard: "* YYPaste it back: "* PThe above only works in the vim version that supports clipboard. See more: http://vcd.gro.clinux.org/doc/usr_09.html#09.3
Text objects in VIM
1. Text objects:Text objects are processed as a whole. The position of the cursor in the object does not matter.For example, aw represents a Text object where the cursor is located. It is a word.
Recently in the study of Linux, bought this vim practical skills, while watching while practicing the process found that some commands in my environment (centos6.6_64 bit) does not support.For example, in the case of a book, when the cursor is positioned at the end of a word, you need to delete the word. can be removed in 3 ways.The first kind of reverse delete: Press "dbx", explain: "DB" command delete from the beginning of the cursor to the beginning of the word content, but will leave the las
easy to fix, that I want to delete a word how to do, or do dw Ah, delete Word, a try, really can delete, But the deletion is the position of the cursor to the beginning of the next word, oh yo, with W should be b,db a try, oh yo, sure enough, deleted the word head, left a tail, a long time, in order to delete the current word, my operation is, B DW, and then I, continue to write, then did not think so much, think still do. Over time, I think there must be a way, sure enough, method to remove th
, after which the powerful Enyo team was subsequently included in the Google revenue bag, The reconstructed Enyo team joined LG with HP's mobile development department, and the current Enyo is an important support for LG's webOS Smart TV. Enyo is very powerful and worthy of further study, and you will benefit greatly.
2. Squire
Squire is a HTML5 Rich text editor, compatible with the standards of different browsers, lightweight and flexible, so that you write a Web page as a genera
, combine hjkl up and down, uppercase ZZ Save and exit Ctrl+f/+b front and back screen flip Browse Ctrl+d/+u front and back half screen flip browse, h,m,l cursor Move-cursor moves to the beginning of the line, n$ the cursor to the end of N, _ cursor moves to the beginning, Ctrl+g Displays the current file name under ESC R replacement, x delete; DNW: delete n words, move the cursor to the first letter of the word, press DNW, if the cursor is anywhere in the word, use
following example, the "y2w" command is used to copy two words, and the "YY" command is used to copy an entire line. "Y" is also used to copy the entire line, the command to copy the current cursor to the end of the line is "Y $ ".
23. Quick commands
X Delete the characters under the current cursor ("DL" shortcut command)
X Delete the character before the current cursor ("DH" shortcut command)
D. Delete the content from the current cursor to the end of the line ("d $" shortcut command)
DW del
, save to Test2.cpp: R CLASS/USER.HPP reads the contents of the file and inserts it after the current lineDW: Delete a word (after the cursor part) inferior to: Daw utility d4w: delete 4 words d$: Delete the current cursor to the end of the line d^: Delete the current cursor to the beginning of the start of the C effect is the same, but after the operation will become insert mode DNW: delete n words DNJ: Delete n rows down DNK: delete n rows upX: Dele
. Repeatedly execute command
: 10,$ W Test2.cpp take 10 to the last line of content, save to Test2.cpp
: R CLASS/USER.HPP Read the contents of the file and insert it behind the current line
DW: Delete a word (after the cursor): Daw practical d4w: Delete 4 words d$: Delete the current cursor to the end of the line d^: Delete the current cursor to the beginning of the start D change to C effect is the same, only after the operation will become insert m
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.