A) vi is the first full-screen interactive editor in linux. B ). Vi has three working modes: command line mode, insert mode, and bottom line mode. c) basic functions: 1. go to edit: vihello. c2. Type I to enter the insert mode. 3. type [ESC] to return to command line mode 4...
A) vi is the first full-screen interactive editor in linux.
B ). Vi has three working modes: command line mode, insert mode, and bottom line mode.
C) basic functions:
1. go to edit: vi hello. c
2. Type I to enter the insert mode.
3. type [ESC] to return to the command line mode.
4. type: Enter the baseline mode.
5. type: wq save and exit
D) function keys in command line mode:
1. • yy: Copy the row where the current cursor is located
2. • [n] yy: n is a number. copy the n rows starting with the current cursor.
3. • p: Paste the copied content to the next line where the cursor is located
4. • dd: delete the row where the current cursor is located
5. • [n] dd: delete n rows starting with the row where the current cursor is located
6. •/name: find the string named "name" after the cursor
7. • G: Move the cursor to the end of the file (uppercase)
8. • u: cancel the previous action (in lower case)
E) base row mode function keys:
1. •: w save
2. • q exits vi (the system will prompt to save the changes)
3. •: q! Force exit (do not save changes)
4. •: wq is saved and then exited.
5. •: w [filename] Save the file as filename
6. •: set nu displays the row number
7. •: set nonu cancel row number
From the column of Ainemo