After viemu is installed in Visual Studio, vim vax shortcut keys are complete, viemuvim
High Efficiency mobile
Outside the insert mode
Basically, you should stay in the insert mode as little as possible, because in the insert mode, VIM is like a "dumb" editor. Many new users will stay in the insert mode because it is easy to use. But VIM is powerful in its command line mode! You will find that after you get to know VIM more and more, you will spend less and less time using the insert mode.
Use h, j, k, l
The first step to use VIM for efficient editing is to discard the arrow keys. With VIM, you do not need to move between the arrow keys and the keys frequently, which saves you a lot of time. In command mode, you can use h, j, k, and l to implement the left, bottom, top, and right arrows respectively. You may need to adapt to this method at the beginning, but once you get used to this method, you will find the efficiency of this operation.
When you edit your email or other text with paragraphs, you may find that the direction keys are different from what you expected. Sometimes you may skip many lines at a time. This is because your paragraph is a long line in VIM's view. In this case, you can type a g before pressing h, j, k, or l, so that VIM will move according to the rows on the screen as you wish.
Move the cursor effectively in the current row
Many editors only provide simple commands to control the movement of the cursor (such as left, top, right, bottom, to the beginning/End of the line ). VIM provides many powerful commands to satisfy your desire to control the cursor. When the cursor moves from one point to another, the text between the two points (including the two points) is called "Crossing", and the command here is also called "motion. (This important concept will be used later)
Here are some commonly used commands (motion ):
Fx: move the cursor to the next x of the current row. Obviously, x can be any letter, and you can use; to repeat your previous f command.
Tx: similar to the preceding command, but it is moved to the left of x. (This is really useful)
Fx: it is similar to fx, but you can look back.
W: move the cursor forward to a word.
B: Move a word behind the cursor.
0: move the cursor to the beginning of the current row.
^: Move the cursor to the first letter of the current row.
$: Move the cursor to the end of the row.
): Move the cursor to the next sentence.
(: Move the cursor to the previous sentence.
Move the cursor effectively throughout the file
VIM has many commands that can be used to reach the desired place in the file. The following are some commands for moving data in a file:
: Move a screen down.
: Move the screen up.
G: to the end of the file
NumG: move the cursor to the specified row (num ). (For example, 10 Gb is up to 10th rows)
Gg: to the beginning of the file
H: move the cursor to the screen
M: move the cursor to the center of the screen
L: move the cursor to the screen
*: Read the string at the cursor and move the cursor to where it appears again.
#: It is similar to the above, but it is looking in the opposite direction.
/Text: search for the string text from the current cursor and reach the place where the text appears. You must press enter to start the search command. If you want to repeat the previous search, press n.
? Text: similar to the above, but in the opposite direction.
Ma: Mark a bookmark at the position of the current cursor. Its name is. Only lowercase letters are allowed. You can't see the existence of bookmarks, but it is already there.
'A: To bookmarks. Note that this is not a single quotation mark. It is generally located on the left of 1 of most keyboards.
'.: The last time you edited the file. This command is useful, and you do not need to mark it yourself.
Efficient input
Automatically complete with keywords
VIM has a very beautiful keyword auto-completion system. This means that you can enter a part of a long term, and then press a key. Then VIM completes the long term input for you. For example, you have a variable named iAmALongAndAwkwardVarName somewhere in your code. Maybe you don't want to input it one by one every time.
To use the keyword auto-completion function, you only need to enter the first few letters (such as iAmAL), then press (hold down Ctrl, then press N) or. If VIM does not give the word you want, basically press it until you are satisfied, VIM will keep repeating the matching string it finds.
Smart entry into insert mode
Many new users only use I to enter the insert mode. In this way, you can enter the insert mode, but it is usually not that appropriate, because VIM provides many commands to enter the insert mode. Below are some of the most commonly used:
I: insert it to the left of the Current Character
I: insert at the beginning of the current row
A: insert it to the right of the Current Character
A: insert at the end of the current row
O: Insert a new row under the current row.
O: Insert a new row on the current row.
C {motion}: Delete the characters crossed by the motion command and enter the insert mode. For example: c $, this will delete the characters from the cursor position to the end of the line and enter the insert mode. Ct !, This removes the exclamation point from the cursor position to the next one (but not included), and then enters the insert mode. The deleted character is stored in the clipboard and can be pasted out.
D {motion}: similar to the above, but does not enter the insert mode.
Valid text for moving large segments
Use visual selections and the appropriate selection mode
Do not want to use the original VI. VIM allows you to highlight (select) some text and perform operations. Three Visual selection modes are available:
V: select by character. Frequently used mode, so try it yourself.
V: select by row. This is especially useful when you want to copy or move many lines of text.
: Select by block. Very powerful. This function is available only in a few editors. You can select a rectangle and the text in the rectangle is highlighted.
When selecting a mode, use the arrow keys and commands described above (motion ). For example, vwww highlights the three words in front of the cursor. Vjj will highlight the current line and the following two lines.
Cut and copy in visual selection mode
Once you highlight the selection area, you may want to perform some operations:
D: paste the selected content to the clipboard.
Y: copy the selected content to the clipboard.
C: paste the selected content to the clipboard and enter the insert mode.
Cut and copy in non-visual selection mode
If you know exactly what you want to copy or cut, you do not need to enter the visual selection mode. This will save time:
D {motion}: Cut the characters crossed by the motion command to the clipboard. For example, dw cut a word and dfS cut the character from the current cursor to the next S to the clipboard.
Y {motion}: similar to the above, but it is a copy.
C {motion}: similar to d {motion}, but enters the insert mode.
Dd: Cut the current row.
Yy: copy the current row.
Cc: Cut the current row and enter the insert mode.
D: cut from the cursor position to the end of the row to the clipboard.
Y: copy the current row.
C: similar to D, and finally enters the insert mode.
X: Cut the current character to the clipboard.
S: similar to x, but enters the insert mode at last.
Paste
Pasting is simple. Press p.
Use multiple clipboard
Many editors only provide one clipboard. There are many VIM instances. The clipboard is called a register in VIM ). You can list all register names and their contents defined currently. The command is ": reg ". It is best to use lower-case letters as the register name, because some of the upper-case letters are occupied by VIM.
The register command is double quotation marks.
For example, we want to copy the current row to register k. You should press "kyy. (You can also use V "ky. Why ?) Now the current row should already exist in register k until you copy something into Register k. Now you can use the "kp" command to paste the content in register k to the desired position.
Avoid repetition
Amazing. Command
In VI, input. (decimal point) will repeat the previous command you gave. For example, if your last command is 'DW '(delete a word), VI will delete another word.
Use numbers
Using numbers is also a powerful and time-saving feature of VIM. You can use a number before many VIM commands. This number will tell VIM how many times this command needs to be executed. For example:
3j moves the cursor down three rows.
10 DD will delete 10 rows.
Y3 "copies the content from the current cursor to the third quotation mark to the clipboard.
Numbers are very effective methods to extend the scope of the motion command.
Record macro
Sometimes, you will find that you repeat the same series of actions in each segment or line of the article. VIM allows you to record a macro to fulfill your special needs.
Qregister: Record macro to register. Here, register is your register name. For example, qa records and stores Macros in register.
Q: The Record of the ending macro.
@ Register: Use a macro with a register. For example, @ a will use Macros in register.
You must remember that macros only record your series of keys and repeat them. They are not magic. There are many methods to accomplish the goal in VIM, so sometimes you need to carefully select commands to record your macros. Because they will be executed in all the places where you want to execute it.
Use VIM to write code
VIM is an excellent editor for writing code, because it has some features dedicated to programmers. Here are some common examples:
] P: similar to p, but it automatically adjusts the indent of the pasted text to adapt to the position of the current Code. Try it!
%: Matching curly braces, square brackets, and brackets. On the top of a bracket, press %, and the mouse will appear at the other half of the matching bracket.
>>: Indent all selected codes.
<: Similar to the preceding but not indented
Gd: arrives at the position where the cursor is located, where the function or variable is defined.
K: Search for the word at the current position of the cursor in Man.
Http://nodex.javaeye.com/blog/360709
Vim search and replace summary
0,: g/null/d
Locate the null row and delete it.
1. Simple replacement expression
The replacement command can replace another word with one word in the full text:
: % S/four/4/g
The prefix of "%" indicates that replacement is performed in all rows. The last "g" Mark replaces all matching points in the row. If you only operate on the current row, remove %.
If you have a word like "thirtyfour", the above command will fail. In this case, the word is replaced with "thirty4 ″. To solve this problem, use "\ <" to specify the start of the matching word:
: % S /\
Obviously, errors will still occur when processing "fourty. Use "\>" to solve this problem:
: % S/\/4/g
If you are coding, you may just want to replace the "four" in the comment, but keep the "four" in the code. Since this is difficult to specify, you can add a "c" mark in the replacement command, so that Vim will prompt you before each replacement:
: % S/\/4/gc
2. Delete unnecessary spaces.
To delete unnecessary spaces behind each line, run the following command:
: % S/\ s \ + $ //
The command specifies that the range is "%", so this will apply to the entire file ." The matching mode of the substitute command is
\ S \ + $ ". This indicates one or more (\ +) spaces (\ s) before the end of the line ($ ). The "to" part of the replacement command is empty :"//". In this way, the matching spaces are deleted.
3. Matching repetition Mode
The asterisk (*) specifies that the items before it can be repeated at any time. Therefore:
/*
Match "a", "aa", "aaa", and so on. But it also matches "" (Null String), because zero times are also included. The asterisk "*" is only applied to the item next to it. Therefore, "AB *" matches "a", "AB", "abb", and "abbb. To repeat the entire string multiple times, the string must be an item. Add "\ (" and "\)" before the component. Therefore, this command:
/\ (AB \)*
Matching: "AB", "abab", "ababab", and so on. It also matches "".
To avoid matching null strings, use \ + ". This indicates that the previous item can be matched once or multiple times.
/AB \ +
Match "AB", "abb", "abbb", and so on. It does not match "a" that follows "B ".
To match an option, use "\ = ". For example:
/Folders \ =
Matches "folder" and "folders ".
4. specify the number of repetitions
To match a specific number of times of repetition, use the form "\ {n, m. "N" and "m" are numbers. The item before it will be repeated "n" to "m" Times (| aggressive sive | contains "n" and "m "). For example:
/AB \ {3, 5}
Match "abbb", "abbbb", and "abbbbb ".
When "n" is omitted, It is 0 by default. When m is omitted, It is infinitely large by default. When ", m" is omitted, it indicates that the repetition is exactly "n" times. For example:
Number of pattern matches
\ {, 4} 0, 1, 2, 3, or 4
\ {3,} 3, 4, 5, and so on
\ {0, 1} 0 or 1, same as \ =
\ {0,} 0 or more, the same *
\ {1,} 1 or more, same as \ +
\ {3} 3
5. Select one or more matches.
In a search mode, the "or" operator is "\ | ". For example:
/Foo \ | bar
This command matches "foo" or "bar ". More options can be connected to the following:
/One \ | two \ | three
Match "one", "two", or "three ".
To match multiple times, the entire decision structure must be placed between "\ (" and:
/\ (Foo \ | bar \) \ +
This command matches "foo", "foobar", "foofoo", "barfoobar", and so on.
Another example:
/End \ (if \ | while \ | \)
This command matches "endif", "endwhile", and "endfor ".
Viemu plugin VIM for Visual Studio installation cracking
Create _ viemurc as the viemu configuration file under the current user directory "C: \ Users \ Administrator"
Download ViMenu
2. Cracking
1. Delete the directory C: \ Documents ents and Settings \ User Name \ Local Settings \ Application Data \ Identities \ {17582A9E-740A-47F2-8256-D09F1378E7FA}
2. Delete the registry entry HKEY_CURRENT_USER \ Software \ Classes \ CLSID \ {D31F31E1-B08F-46FF-92C5-CA111A2053DF}