From: http://jinux.hit.edu.cn/courses/computing/linux-viMingLing77_1.html
Linux VI commands
VI command
VI Introduction
VI is a universal full-screen document editor in the Unix world. It can be said that almost any unix machine wi
:: Wqall Save all files and exit: All Save All Files: Qall Exit All FilesMultiple windows:-O: Horizontal split window-O: Vertical Split windowSwitching between windows: Ctrl+w,arrowNote: Individual files can also be split into multiple windows for viewingCtrl+w,s: Water Split windowCtrl+w,v: Vertical Split windowCustomizing the working characteristics of vim:Note: The settings in the last line mode are only valid for the current VIM process;Permanently valid:Global:/ETC/VIMRCUser personal: ~/.VI
Recently on the internet to find some video, self-taught a little bit of Linux environment, C programming method.Note VI and VIM are different, vim open source files where the keywords are color.The VI editor has 3 modes, command line mode, insert mode, and bottom line mode.If it is the first time to use VI, it is reco
VI is the short name of visual interface, it is a text editor under Linux/unix, for example, if you want to edit the file English.txt, you can enter the VI english.txt command under terminal and then enter the editing interface. 1:vi ModeA) General mode: VI when processing a
Match Spark or Sperk
Spark, Sperk
4. Text substitutionText substitution uses the following syntax format::[g][address]s/search-string/replace-string[/option]Where address is used to specify a replacement scope, the following table shows common examples:1 s/Downloading/Download//将当前缓冲区中的第一行到第五行中的Spark替换为spark:1,5 s/Spark/spark//将当前缓冲区中的第一行到当前光标所在行的Spark替换为spark:1,. s/Spark/spark//将当前光标所在行到缓冲区最后一行的Spark替换为spark:.,$ s/Spark/spark//将整个缓冲区中的Spark替换为spark:% s/Spark/spark//当前行中第一次搜
The VI Editor is a text tool that handles ASCII data. Most Linux distributions already have the VI editor installed by default. VI is the abbreviation for Visual interface vim is the visual interface improved is the enhanced version of the
address can be selected by HTTPS protocol ( https://github.com... ), SSH Protocol ( [emailprotected] ).If you choose the SSH protocol, you must add Ubuntu's public key to GitHub. See nextSSH KeyGenerate SSH Key:ssh-keygen –t rsa –C "你的邮箱@xx.com"Pop-up option when key is generated, enter default to select.Key Save Location:/root/.sshLogin to GitHub and create a new SSH key with /root/.ssh/id_rsa.pub Chinese textThere are local libraries and remote libraries, both of which are synchronizedChanges
the wordDD//delete cursor in the rowNDD//Delete the row below the line nD1G//Delete all data from the row of the cursor to the first row.DG//Delete all data from the line to the last row of the cursor.YW//Copy the wordyy//Copy all data from the line where the cursor is locatednyy//the next n rows where the cursor is copied, n is the numberY1G//Copy the cursor line to the first row of all data.YG//Copy the cursor line to the last row of all data.P//Paste the copied data to the following lineP//P
Vi tips and tricks: 10 amazing commands
When using the vi Editor-whether it's a first-time user or experienced user-most people tend to only master the Core Command set and these commands can execute the most common functions: navigate or save the file; insert, update, delet
1. enter the vim editor mode: (when entering the vim editor, the default mode is the command mode) enter vi on the terminal: Enter the vim editor vifilename: Enter the vim editor, and create a new filename File, position the cursor to the first line of the file. when
Linux VI Edit common commands
Source: Internet anonymous time: 07-10 21:31:14 "Big Small"
Linux VI Editing common commands, the need for friends can refer to the nextThere are three status modes in the VI editor1. Command mode2. Input mode3. Last-line modeConversion
commands allow numbers to be used to specify how many times the command repeats: 5J,10DD, etc.Cut, copyWhen vim deletes data, it actually saves the data in a separate register. You can use the P command to retrieve the data. (This attribute can be deleted for clipping)Copy operation with the y command (yw copy the word, y$ copy to the end of the line, you can also copy multiple lines in the visual mode, press the V key into the visual mode, select th
with P
h Adoop, Hadaap
:/e>
like, source
:/\
Find the string starting with had, \ also has special meaning
hadoop, Hadoo
:/spa *
\
spark, Spaspark
:/sp[ae]rk
match spark or Sperk
spark, Sperk
4. Text substitutionText substitution uses the following syntax format::[g][address]s/search-string/replace-string[/option]Where address is used to specify a replacement
VI is a text editor with a plain character interface as standard under Linux/unix. Because the mouse function is not supported, there is no graphical interface, the related operations are to be done through the keyboard instructions, need to memorize a large number of commands. So many people do not like it, but at the same time because the keyboard is often fast
In the current text editor era, the default Linux editor is still vi or vim. The Linux vi commands discussed in this article will help novice administrators better use vi.
This is inseparable from Linux
document content: cat Example: CAT document
Split-screen display: ls-L/directory | more
Merge to a new document: CAT a.txt B .txt
Configure environment variables:
CSH. cshrc source cshrc
Execute. profile or source. Profile in bash.
This editor is the most commonly used tool in any computer system. In UNIX, the editors include ex, sed, and VI. Among them, VI is t
double quotation mark''Move to the beginning of the row where the first row is located (after the cursor moves)-two single quotes
19.At the same time when vi multiple files, the CTRL-SHIFT-6 back to the previous file, in the VI file and the last VI file switch.But I found a bug: when I switched to the previous file with a CTRL-SHIFT-6 and checked the multi-file
The vi editor has three modes: Command mode, input mode, and last line mode. It is very important to master these three modes:
Command mode: After vi is started, the command mode is entered by default. From this mode, you can use the command to switch to the other two modes.
In any mode, you only need to press the [Esc] key to return to the command mode. Enter t
character# Ctrl + W-clear the cursor before a word# Ctrl + K-clears the character of the cursor to the end of the line# CTRL + T-swap the first two characters of the cursor# Ctrl + Y-paste the characters that were removed from the previous Ctrl+u class command# CTRL + P-Previous command# CTRL + N-Next command# Ctrl + V-Input control word such as CTRL + V.Second, vi command to modify the file and how to use the SaveThe
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...
The
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.