(Rpm) Mode Vim

Okay: here

http://assslove.iteye.com/blog/860957

Wrote a whole too. admire

 

 

1. Vim has three main modes, a normal mode (Normal), insert mode (insert) and visual mode (visual).

    Normal mode can execute commands. By default, Vim starts will enter this mode.
    Insertion can insert text mode.
    Visual mode can visually select a piece of text, and then execute a command or operation only for this text.

2. Normal mode.

: command condition  such as:

    : Echo will pass his text displayed on the screen.

    / Word search word and the word to jump to the first occurrence of.

    : Help usr_toc get a directory reference manual.

3. Insert mode.

i 在光标之前插入文本
I 在行首插入文本
a 在光标之后插入文本
A 在行尾插入文本

o 在当前行之下开始一新行
O 在当前行之上开始一新行

s 替换当前字符
S 替换当前行
r 替换当前字符且返回正常模式
R 替换后续字符不返回正常模式
 

 

4. Visual mode.

Press v Visual mode is started.

Use the arrow keys or the move command to select text.

Press c to modify the text.

Move the cursor:

1. All are beginning to move from the current position.
hjkl four keys respectively corresponding to the left, down, move up, move cursor.
h on the far left, meant to be to the left.
j j sagging, means to move down.
k k means protruding upward shift upward.
l At the far right, which means to the right.
    It may represent the number of repeats in operation with the addition of numbers. For example, 2j j operation is repeated twice.

w Move the cursor to the next word.
} Move to the next segment.
3fh move to position the letter h appears the third time.
35j want to move down 35 lines.
It means rearwardly ctrl-b ( 'b'ackward) to scroll a screen
ctrl-f means a screen to scroll forward (' f'orward)

2. Character Mobile:

Press G will jump to the last line of the file.
1G by moving the cursor to the first line.
20l right by 20 characters.
Press ^ jump to the first character of the current line.
Press the $ skip the last character in the current line.
H where the highest jump by the current window ( 'h'igh, first row)
by M to jump to the center of the current window (' m'iddle)
by L where the lowest current jump ( 'l'ow window, the last line )

3. The word mobile:

Press w to move the first letter of the next word, 2w i.e. two words
by e letters to scroll to the end of the next word
by word a retracted b ( 'b'ackward), 2b reverse two words

    For details, see: help word-motions.
4. Mobile sentence:

Press (move to the previous sentence
by) move to the next sentence

Paragraph 5. Mobile:

Press} move to the next section
by section to move {

    For details, see: help cursor-motions.
6. mark:

Create a tag with a called ma, move the cursor to any place,
press' a (i.e., single quotes tagged name), Vim jump first row marked line.
Press `a (i.e., on the left a row of numeric keys key), Vim jumps to make the position mark.

May be used any of the letters (a-zA-Z) to name a tag means that a file name can have up to 52 markers.

7. Jump:

ctrl-o to jump to a location.
ctrl-i to jump back to the next position.

8. Select the text segment
is pressed into the v visual mode, pressing the select period ap ( 'a' 'p'aragraph). Press ~ flip this text case. If you want to cancel selection, press <Esc> to.
Other text object mnemonics are: aw means a word ( 'a' 'w'ord), a " means that the reference period (such as" this is a quoted string ") , ab mean a text ( 'a' 'b'lock, everything parentheses), and so on.
    For details, see: help object-motions and: help text-objects.

9. More interesting moves, see: help various-motions and: help motion.

help:

: Help reading: help document,

    The first line is the grammar, the second line is to explain the role of this command, the second section contains more reference.

: Helpgrep help search for a word in the entire document.

    Use: cnext and: cprev move to the next or previous match, use: clist to view a list of all the matches.

------------------

Another note.

v character selection, place the cursor through the selection highlight.

V row selection, the cursor will highlight the selected row through.

Ctrl + v block selection, use the arrow keys to move the selection block.

y copy the selected place, i.e. highlight portion.

p Paste

d to highlight areas removed.

 

Transfer: http://www.cnblogs.com/way_testlife/archive/2010/10/08/1845300.html

Reproduced in: https: //my.oschina.net/uniquejava/blog/225022

Guess you like

Origin blog.csdn.net/weixin_33719619/article/details/92505500