1. Text Editor;
There are many text editors, such as gedit, kwrite, OpenOffice ......, in text mode, the editors include VI, VIM (enhanced version of VI), and nano ...... VI and Vim are the most commonly used editors in Linux. It is necessary to introduce the simplest usage of VI
1. Three status Modes
2. Common VI commands
: E filename (open a new file to the VI editor): E! Filename (open a new file to the VI editor and discard modifications to the current file)
: R filename (read file content to the cu
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
The VI command is a common and important command under UNIX to edit one or more files in Full-screen mode. If you do not specify a file in VI, then the VI command will automatically generate a nameless empty working file. If the specified file does not exist, a new file is created by the specified file name. If changes to the file are not saved, the V I command d
| -O file1 file2 file3 ...-o: Open multiple windows horizontally ^+w, UP ARROW | DOWN ARROW: Switch between multiple windows;-o: Open multiple windows vertically ^+w, LEFT arrow | Right ARROW: Switch between multiple windows; 13. Common commands in ex mode: 1. Display and Cancel line numbers:: Set Number (abbreviated: Set NU): Set Nonumber (abbreviated as : Set Nonu) 2. Turn character case sensitivity on or off: Set IgnoreCase (abbreviated as:
VI and VIM are both text editor, the difference is that Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it.Vim/vi is a powerful full-screen text editor, which is th
This chapter learns how to save commands in the VI editor.Save command:There are many ways to save a long sequence of commands in VI and EX, so that when you call a saved sequence, you only need to enter a few characters.Word abbreviations:You can define abbreviations so that VI
The VI Editor is the standard editor for all UNIX and Linux systems, the VI editor is exactly the same for any version of UNIX and Linux systems, its power is not inferior to any of the latest text editors, VI is also the most bas
is the most efficient tool for creating and editing simple documents;2. How to Use the VI Editor
(1) how to call vi
Run the following command to go to the following page:
[Root @ localhost ~] # Vi filename~~~(2) Three command modes of VI are available:Command mode, used to
Take a look at the picture first
VI Editor as a programmer artifact, it is necessary to learn. what is Vi/vim.
Almost all the configuration files in the Linux world exist in plain text, and the VI editor is available on all Linux distribution systems, so it is convenient t
: The paste cursor follows the line, which is to paste the copied contents to the next row of the cursor. yy: Copy cursor linenyy: Copy n rowsu: Redo Last Action Edit mode ( press ESC to return to command mode, and then press: to the bottom line command mode ). In the command mode when we press the I key to enter this mode, this time you can edit the text. Each character we enter will be written, unlike the command pattern, which represents a command. Bottom Line Command mode: Support some of th
CentOS6.4 text editor Vi/VimVim/Vi introduction Vim/Vi is a powerful full-screen text editor, the most common text editor on Linux/UNIX, it is used to create, edit, and display text files. Vim/
command: n1,n2 W!command: The contents of the N1 line to the N2 line in the file are entered as command and executed, and if N1,N2 is not specified, the entire file content is entered as the command: R!command: The output of command commands is placed in the current lineRegister operation"? Nyy: Saves the contents of the current row and its next n rows to the register?" , where? is a letter, n is a number"? NYW: Saves the current line and its next n
|: column n of the current row;
Move based on text blocks:
In the vi editor, you can move text blocks (words, sentences, paragraphs, or sections. We have already talked about moving by words (w, W, B, B). Next we will introduce several commands for moving the cursor based on text blocks:
E: Move to the end of a word;
E: Move to the end of a word and calculat
VI The Editor is the standard editor for all UNIX and Linux systems, and its power is not inferior to any of the latest text editors , here is simply a brief introduction to its usage and a small number of instructions. Because theVI Editor is exactly the same for any version of UNIX and Linux systems, you can learn mo
Tags: line edit image character cursor position action str return DIV errorBefore introducing the VI editor, let's take a look at the use of aliases in the Linux system (article knowledge written from Bo Master worm, thanks to bloggers)Aliases are different two names refer to a person, different two commands have the same effect.Now, you must be wondering what al
VI Basic concepts are neither introduced, Baidu, Wiki has. Below is a brief summary of what I have learned from VI,1.VI is divided into three states: Command mode, insert mode, and bottom line mode.(1). command line pattern-command modeis to control the movement of the screen cursor, mainly into the insertion mode and the bottom line mode of the neutral (like a m
displayed at the bottom of the window.
Yanyb. H1: 1 int A = 1; file1.c2: 6 x =;
Each row in the list listed above has a label. to jump to a certain item, you only need to enter the corresponding label first:
3 [ 2.2 keyword completion during the program editing process
Many program editors provide the keyword complementing function, and the VI editor is no exception. The corresponding
filenameWQ filenameSave the file being edited as filename and exit VIQ!Discard all changes, exit VISet NuShow line NumbersOr?Find, enter what you are looking for in/afterNwith/or, if the search is not the keyword you are looking for, press N or backwards (with/to) or forward (with?) to continue looking until you find it.For the first use VI, there are a few notes to remind:1. When you open a file with VI,
character of the line. To move through the current line, you can use the following command:
^: Moves to the first non-blank space of the current line;
n|: Moves to the nth column of the current row;
To move according to a text block:The VI Editor can be moved in blocks of text (words, sentences, paragraphs, or sections). I've already talked about moving by word (w,w,b,b), and then I'll i
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.