Configuration files and shell script files are both text files, which must be edited using a text editor. In Linux, there are many types of text editors, including the character interface vi and emacs, and the graphic interface gedit under the "attachment" menu item) ", you can choose to use according to your preferences, but for users who learn to use the Linux system, the school
Article Title: Introduction to the usage of file editor vi. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Vi is short for visual editor and one of the editors provided by UNIX. It
Linux Text Editor-viI. VI simple descriptionIn Linux, we always recommend that you use the text status to handle Linux system settings, because it not only makes it easier for you to understand the running status of Linux, it is also easier to understand the basic spirit of the entire setup, and more "ensure" that your modifications can be smoothly run (here we will re-emphasize that different Linux distrib
you are currently in, pressing ESC two times will return to normal mode.Exit VI EditorTypically exits the VI Editor in command mode.
Exit Command
Description
Q
If the file is not modified, it is returned directly to the shell, otherwise prompts to save the file.
Q!
Forcibly exits without saving the mod
Next, use the VI Editor (1) 1.4 move the cursor
Many commands in the VI editor are based on the current position of the cursor. Therefore, it is very important to move the cursor to the desired position. The following is a detailed description (unless otherwise specified, t
Vi is actually the visual mode of the ex-line editor. each time the ex-editor displays a row by default, to use the ex command in vi, you must first enter: Enter the ex Mode. Www.2cto. comvi is a visual editor. by default, the vee-eyevi reading is in the command mode, and th
(Uppercase X), delete the character before the cursor
# X
Delete # characters before the cursor
Dd
Delete the row where the cursor is located
# Dd
Delete # rows from the number of rows where the cursor is located
YW
Copy a word at the cursor position
# YW
Copy the # characters at the cursor position
YY
Copy a line at the cursor position
# YY
Copy the number of rows from the cursor
P
Paste
U
Cancel operation
CW
Change the cursor position.
# CW
# Words for changing the curso
deletes the row where the cursor is located and removes gaps
NDD deletes n rows of content and removes gaps
3 dd delete 3 rows and remove gaps
3. paste and copy
The content (such as characters, words, or rows) deleted from the body is not really lost, but is cut and copied to a memory buffer. Users can
Paste it to the specified position in the body. The command to complete this operation is:
P: lowercase letter P. paste the content of the buffer to the end of the cursor.
P capital letter P, pas
The VI editor is a standard editor for all UNIX and Linux systems. It is not inferior to any of the latest text editors. Here is a brief introduction to its usage and a small
Sub-commands. The VI editor is identical for any versio
pattern know these commonly used can, do not remember when check, use more accustomed. 3. Edit modeEditing mode is the simplest mode, as normal as txt text-like editing, there is no big special place. Here is how to switch from command mode to edit mode when different command cursors are inserted in different locations.If the current end-line mode must first switch to command mode to enter the edit mode, the last line mode to the command mode: The ESC key between the last row mode and the edit
Vi is a screen editor provided by all UNIX systems. It provides a Windows device that allows you to edit files. Of course, people who know a little about UNIX systems think that vi is super difficult to use, but vi is the most basic editor. After learning
The VI editor is a standard editor for all UNIX and Linux systems. It is not inferior to any of the latest text editors. Here we just briefly introduce its usage and a few instructions. The VI editor is identical for any version of UNIX and Linux systems, so you can learn mo
Unix Linux vi Vim User manualAbout ViVi is the most popular full-screen document editor in the Unix world, and almost any UNIX machine can saywill provide this software. Linux Of course also has, its VI is actually Elvis (copyright question), but they allAlmost. Familiar with the DOS of the document processing, may feel that
Using the VI (VIM) editor on Linux tutorialMay 24, 2011 morning | VPS DetectiveVI (VIM) is a very common editor on Linux, and many Linux distributions have VI (VIM) installed by default. VI (VIM) commands are numerous but if used
of the file
Option to open VI:I have previously said "VI filename" This simple way to use the VI Editor to open the file, there are many useful VI command open options. Advance to a specific location: You can specify in the command line how the cursor will move the first time after the file is opened, such as by line
VIEditoris the standard for all UNIX and Linux systemsEditorThat it's powerful not inferior to any of the latest textEditor, here is simply a brief introduction to its usage and a small number of instructions. Because of any version of UNIX and Linux systems,VIThe editor is exactly the same, so you can make any other introductoryVIPlace to learn more about it. VI is also the most basic text
Switch to last line mode
Shift +:
Saving files to the desktop
W DESKTOP/WELCOM.C
Exit
Shift +: QAfter the order is complete, you can almost simply use the Gvim editor. Here, to learn vi/vim the simplest way is to use it, as far as possible, full keyboard operation, do not use the mouse. (When you all work with the keyboard to complete, is not a kind of hacker's sen
VI (VIM) is a very common editor on Linux, and many Linux distributions have VI (VIM) installed by default. VI (VIM) commands are numerous but if used flexibly it will greatly improve efficiency. VI is the abbreviation for "Visual
Using the VI (VIM) editor on Linux tutorial------------------------------------------------------------Ikong-------------------------------------------------------------VI (VIM) is a very common editor on Linux, and many Linux distributions have VI (VIM) installed by default
mode. The following figure:
If we need to insert text or delete text inside the document, we need to go into insert mode. The way into insert mode is to press the I or a key of the keyboard in command mode. The –insert– identification is displayed in the view. You can then begin editing the text. The following figure:
The bottom line mode is generally the VI editor to operate and set up, more commonl
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.