Vim has a lot of detailed commands, we use a number of common entry commands, enough to deal with the daily code editing work, if you need to use other commands later, it is not too late to query.Vim generally has 3 editing modes, namely insert mode, Normal mode, and last line mode.The following is mainly in normal mod
Since 1970s, Vi has been one of the best programmers. No matter you are a beginner or veteran of Vi, the following section provides 100 useful Vi commands, which I believe will be helpful to you.Basics
: E filename
OpenFilenameFor edition
: W
Save file
: Q
Exit Vim
: W!
Exit Vim without saving
Search
Detailed explanation of the Vim commands in CentOSThis figure draws on the basic movement methods in vim. To facilitate programmer, it lists many buttons that can only be used by programming. In addition to this, there are actually some useful things that I did not expect to draw (such as tags, tabs without standard keys, man ..), if you have idea, you are welcom
Common Vim/VI commands:
Its replacement function is very useful. For details, see vimreplacement function. html
Search for a word:/word, or move the cursor to the word using the * command. Vim will get the word on the cursor and use it as the string to be searched, while # is reverse lookup.
[,]: The cursor jumps up and down between empty rows.
X or delete i
Vivian are sky2.: N, $s/vivian/sky/the first Vivian of each row in the beginning of line N to the last row is sky: N, $s/vivian/sky/g replace the nth line to the last row all Vivian are sky(n is a number, if N is., representing the beginning of the current line to the last row)3.:%s/vivian/sky/(equivalent to: g/vivian/s//sky/) replaces the first Vivian of each line as Sky:%s/vivian/sky/g (equivalent to: g/vivian/s//sky/g) replaces all Vivian in each row as Sky4. You can use # as a delimiter, at
Tags: edit stylebiosios full Stack grub start mode file archive
Day5 python full stack s3 the last Class review
S3 Python full stack day5 file merge and file archive
S3 Python full stack day5 file archive with two compression methods
Python full stack S3 day5 Vim Editor
Python full stack S3 day5 system start-up process
Python full stack s3 Day5 Grub Encryption
-Python full stack s3 day5 BIOS encryption
The pyt
1. when looking up the/etc/issue file, use man issue to find manual in See also appears MOTD (5), Agetty (8), Mingetty (8). And what issue (5) means at the beginning of the document.Man man is explained after:1 executable programs or shell commands-->Shell executable program or command2 System calls (functions provided by the kernel)--kernel Invoke tool or function3 Library calls (functions within program libraries)--functions and function library cal
Several recent Vim commands-general Linux technology-Linux programming and kernel information. The following is a detailed description. : Ls
LIST Buffer lists
: Buffer #
Open the file in the corresponding buffer area code
: Bnext
: Bprevious
: Bfirst
: Blast
: Pwd
Show Current Directory
: Cd directory name
Change current directory
: E file name
Create a file in the current directory
This is used for a long time in advanced programming for Linux. Today, I have time to sort it out.
Http://www.cnblogs.com/witcxc/archive/2011/12/28/2304704.html original blog.
My personal experience: Although Vim can be designed to be user-friendly, it is still very troublesome for programmers who are used to writing debugging programs using vim. We can map the files in Linux and compile and debug the
Tag: Pos Post search detects down art ble MRC consistencyVIM basic Commands
Cursor movement
G last lineNG moves to nth row n return cursor moves down n rowsGG First Line
Find and replace
/wordn Repeat previous Find operation N search up: n1,n2s/word1/word2/g from line N1 to section N2 find N1 replace with N2 last behavior $
Delete, copy and paste
X,x backward Delete [del], forward delete [BACKSPACE] NX Continu
operationVim is a text editor developed from VI. Code completion, compilation and error jump and other convenient programming features are particularly richEnter insert mode:i: 插入光标前一个字符 I: 插入行首 a: 插入光标后一个字符 A: 插入行未 o: 向下新开一行,插入行首 O: 向上新开一行,插入行首Enter Command mode:ESC: Enter command mode from insert mode or last line modeTo move the cursor:h: 左移 j: 下移 k: 上移 l: 右移M: 光标移动到中间行 L: 光标移动到屏幕最后一行行首 G: 移动到指定行,行号 -Gw: 向后一次移动一个字 b: 向前一次移动一个字{: 按段移动,上移 }: 按段移动,下移Ctr-d: 向下翻半屏 Ctr-u: 向上翻半屏Ctr-f: 向下翻一屏 Ctr-b:
We often use the vim editor when editing text in our daily work. although vim is powerful and mdash is almost omnipotent, when we get used to word, I still don't think it's easy to get started, and it's hard to remember a lot of gray commands. here I will write down the frequently used command list for you to quickly check...
We often use the
Since 1970, VI and Vim have become one of the programmers ' favorite text editors. 5 years ago, I wrote a question called "100 vim commands that every programmer should know." This is an improved version of the previous article, I hope you will like it.Basis
: E filename
Open filename for edition
: W
Save file
Original: Http://www.oschina.net/news/43167/130-essential-vim-commandsSince 1970, VI and Vim have become one of the programmers ' favorite text editors. 5 years ago, I wrote a question called "100 vim commands that every programmer should know." This is an improved version of the previous article, I hope you will like
One, common commands1. "Sudo vim file name", edit the file as Administrator.2. ": q!" Force exit(PS: When you change the httpd.conf file, you will be prompted E45: ‘readonly‘ option is set (add ! to override) when you save ", must use": wq! " Save ....If you continue to prompt " "readonly-file-name" E212: Can‘t open file for writing ", you need to use the admin sudo command to perform vim )(See the example
insertion mode, is the current cursor position from the next position to start typing text; press [o] into insert mode, insert a new line from the beginning, enter the text. 2). Switch from Insert mode to command-line mode by pressing the [ESC] key. 3). Move the cursor vi can be directly with the cursor on the keyboard to move up and down, but the normal VI is the lowercase English letter [h], [j], [K], [l], respectively, control the cursor left, bottom, upper, and right to move one grid. Press
: S/old/new
Replace all of the strings in a row with old as the new string, please enter: s/old/new/g
Replace all the strings in the two lines with old for the new string, enter: #, #s/old/new/g
Replace all the strings in the file with old for the new string, please enter:%s/old/new/g
Ask the user to confirm that each replacement needs to be added with the C flag:%S/OLD/NEW/GC//full-text replacement recommended
Seven. Text modification (insert mode)
Enter lowercase
Capital P represents the front of the cursor (top)A copy of the entire row is pasted on the cursor (bottom) row, and the non-full row copy is pasted before (after)Note: In a regular expression, ^ represents the starting position of the matching string, and $ represents the end position of the matched string. A command preceded by a number indicating the number of repetitions, plus a letter indicating the name of the buffer used. Use the English period "." You can repeat the previous command. Wh
A. Vim simple commandPWD Current PathLS current path all directories CD directory address jumps to the specified directory /xxx Find xxxX Delete Current characterN performs the last lookupTwo. Why use Apache serverCan have a test server, not all of the special network services can be found free! , some special server functions, Apache can be very good supportThree. Install and configure Apache server1. Set up your own computer as a server2. The comp
I have summarized 18 very useful vim commands. The most famous program editor in Linux is not vim. In normal mode, 1. dd -- delete the row where the cursor is located 2./word -- specify the word for full-text search 3.G -- move the cursor to the last row of the file and move it to 99th, delete one character in 99G4 and lowercase x, and delete one character in upp
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:
[email protected]
and provide relevant evidence. A staff member will contact you within 5 working days.