one. Vim
VIM has three modes: Command mode, insert mode, exit mode
its simple introduction please own Baidu, this article mainly introduces the more detailed common and uncommon but important operation
Vim File # #对file进行编辑
Go to command mode by default when file is opened
1. Command mode
1) Setting
Vim/etc/vimrc
: Setnu|nonu ### #行号的显示
: Setmouse=a ### #设定鼠标可以操作光标位置
: Help ### #查看vim的用法,: Q Quit helping
Ctrl + V ### #高亮选择模式, you can select a region operation
U ### #恢复到未操作之前
CTRL + R ### #恢复到操作之后
2) Add characters in bulk
Ctrl + V Select the bit where you want the character to be added, press the I key, add the character you want to add, press ESC
3) Split-screen function
Ctrl+w S ### #上下分屏
Ctrl+w v ### #左右分屏
Ctrl+w C ### #撤销光标所在屏幕
Ctrl+w | | left | right #移动光标到指定的屏幕中
4) Substitution characters
in command mode
:%s/original character/replacement character/g
5 Search Keywords
/key word
N-Down match
N match up
6) Character Management
DW Deletes the word where the cursor is
DL Delete Letter of light
DD deletes an entire line
D Number d Delete number specified number of lines
D number up-key to delete the specified number of rows
YW copy the word of the cursor
YL Copy the letter of the light
YY Copy an entire line
P Paste
Y number y-copy number of lines specified
CW cut words in the cursor
The letter where the CL cuts the light
CC Cut one whole line
C digit C cut number specified number of lines
Note: When the cut is finished, it will enter insert mode, and then press the P key to exit insert mode before pasting.
: line number move cursor to specified line
G move cursor to file last line
GG Move cursor to file first line
2.vim Insert Mode
I cursor sit at position insert character
I Insert the line at the beginning of the cursor
A the next insertion of the character's cursor
A cursor is inserted at the end of the line
o The next line of the row where the cursor is located
O the previous line of the line where the cursor is positioned
s deletes the cursor where the character is inserted
S Delete cursor insertion line
Exit mode for 3.vim
Enter in command mode
: Q Exit, can be used when no changes are made to the file
: q! Force exit
: Wq Exit Save
: wq! Force Exit Save
4.vimtutor
Vimtutor is a description tool for Vim, which stores the detailed usage of vim and, if necessary, consult
Note: Exit this tool with: Q
Second: Text editor in graphics Gedit
Because it runs in the graphical interface, does not do too much introduction, most functions can be implemented by the mouse
Crtl+n New Window
Ctrl+s Save File
Ctrl+o Open File
Ctrl+x Shearing
Ctrl + V Paste
CTRL + C copy
For Giedit software Help, the view can be used
Yelp Help:gedit