This chapter learns the global substitution commands in the VI editor. With the global Replace command, you can automatically replace all occurrences of a word in a file. a global substitution typically uses two ex commands: ": G" (Global), ": S" (substitute). Replace command:The syntax for the Replace command is the f
VIVI is a computer text editor, written by the American computer scientist Bill Joy Bill Joy, and released in 1976 with the BSD license.VimVim is a text editor developed from VI. Its code completion, compilation and error jump and other convenient programming features are particularly rich, in the programmer is widely used. And Emacs are a favorite
In Linux, the execution of a script can help us save a lot of time, for the execution of the script it is understood by the individual, it is the same as the beginning of the file #! Bin/bash through the VI editor to create a new executable file, the usual we deal with the garbage command all with the editor, its style is the same as the document file, if edited
"VI Editor"
Show rows, set number
First, the order to enter VI
VI Tech: Open or create a new file and place the cursor at the beginning of the first line
VI +n TECH: Open the file and place the cursor at the beginning of nth
VI
Note: These commands have a colon before them:Edit Exit VimWhen you are finished editing the document, you are ready to exit VI when you return to the shell, you can use one of the following methods.In command mode, double-press two capital Letter Z, if the currently edited document has been modified, VI saves the document and exits, returns to the shell, and if
the window is the last window to open the file, the buffer is hidden. If the hidden option is not set, and the window is the last window to open the file, if the buffer has unsaved modifications, the command fails (you want to force the window to leave at this point, you can add it after the QUIT command!). , thereby discarding the modification of the buffer).^WC: Closes the current window, if the current window is a unique window on the screen, the command failed to execute.: Only,^wo, ^W^ O:
The main contents of this section
Three modes of the VIM editor
Move cursor
Input mode
Modify text
Zhou Zhihu L.Number: ZhouzhihubeyondNET Name: Rocking Teen Dream1. Three modes of the VI editorLearning to use the VI editor is one of the most essential techniques to learn Linux systems, becaus
Vi and vim Editor (9): Global replacement (2)
The previous article has learned how to use the ": s" command in the vi editor to perform global replacement. In addition, you can use regular expressions in the replacement command to perform powerful pattern matching. This article will learn more examples of pattern match
Vi and vim Editor (16): vim's Multi-Window Function (1)
By default, vim edits all files in a window. Only one buffer zone is displayed when files are moved or moved to different parts of the file. However, vim also provides multi-window editing to simplify the composite editing tasks. This article will learn how to use multiple windows in a running vim process, including initializing and starting multi-wind
in Linux with vi Edit and modify file configuration without color display file content, especially some keywords can not be color display, to configure our service process caused great inconvenience. "In fact, the main is VI itself without color, vim with color" below gives a solution.
VI Editor code highlighting set
Vim/vi features a powerful full-screen text editor. The main is to build, edit, display text. www.vim.org Building shell Scripts : Set number causes the file to appear with line numbers A after the cursor attachment file I insert text before the cursor o back to the cursor insert a new line A at the end of the bank attachment file I at the beginning of inserting text o insert a new line on the cursor Comma
All instructions for VIM compatible VIThe VI command has the following characteristics:
There's a difference in case letters.
Does not appear on the screen when you enter it
No more commands to add the ENTER key
1. Open and Close filesWhen you edit the text, vi copies the files you want to edit to the buffer (the part of the staging local co
1. Why should we learn the vim editor?
There are many text editors in the command line interface of Linux. For example, we often hear about Emacs, pico, nano, joe, and vim. Vim can be viewed as the advanced version of vi. Why do we have to learn vim? There are several reasons:
(1) All Unix like systems have built-in vi text editors. Other text editors do not nece
positionA: Enter a character by moving the cursor to the end of the current lineO: Add a line below the cursor line to start typingO: Add a new line above the cursor line to begin entering charactersWhen the input is completed, press ESC to return to the command mode, so that VI also has no advantages, the most commonly used copy, cut, paste it? And, how do you save the file?These are implemented in the last line mode,Assuming the current command mod
The vi Editor full name is Visual Interface, which is a visual interface, like Notepad in Windows, Vim is equivalent to an upgraded version of VI, which contains all the operations commands of VI, and what vim does with respect to VI
Article Title: Linux vi editor command excellent edition. 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.
Recently I started to use the vi editor. After several days, I found that i
The vi editor is a text tool that processes ASCII data. Most linux distributions have already installed the vi editor by default. Vi is short for visual interface. vim is visual interface improved (enhanced version) vi. By default
Introduction to the use of the VI Editor 1. Introduction to history
China Mobile's mobile phone text message background uses UNIX, which is relatively stable;2. Appearance of Linux
Minix-Linux torvlads -Minix Operating System-Linus torvlads-Linus: Finland, 386 PC computers; The UNIX operating system is so good, why can't it be installed on a PC? -Port minix to a PC-Linux name: (1) Linus is modest; (2) Lin
VI is the abbreviation for ' Visual interface ' and is an interactive text editor with a pure character interface as standard under Linux. You can perform many text operations, such as output, delete, find, replace, block operations, and so on, and you can customize them to suit your needs. All of its operations need to be done through the keyboard instructions, if you can skillfully apply, it will be very
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/
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.