ViEnter VI without reading into any fileVI filename enters VI and reads the file with the specified name (both new and old files can) store and exit vi:w filename is stored in the specified file but does not exit VI (the current working file name if
Use of the VIM editorCommands used by VIM
: Q Exit VI directly:
Wq exit VI after saving, and can create new file
: q! Force exit
: W file saves the current content as a file
: Set Number | NU Displays line numbers in edit
The first step:Manually mount the Redhat to the virtual machine.Step Two: query whether to install VIM [1] (here is just the mini version installed)Step three: Hang the fileFourth step: Build a Yum sourceFifth Step: Install VimAbout public key for *.
Displaying two different files, or displaying two different places of a file at the same time, or comparing twoThing This can all be achieved through the split window.The simplest command to open a new window is as follows:: Split (split
Before I did not know why to learn the Vim and VI editor, just heard people say that this is important to Linux.First of all, why study this editor, the individual reading comprehension.The important task of a system administrator is to participate
Vim and Emac are the most popular two text editing tools in the Linux world, focusing on learning one, tentatively using Vim as the Learning object. In this article, some basic operations will no longer be introduced, only the most commonly used
Emacs is the editor of God, and Vim is the god of the editor. Why do they have such a reputation, and listen to this article to you one by one of the way.
Author:
Jiqing Wu
Email
[Email
First, download: Download Emacs-24.3-bin-i386.zip in emacs:http://mirrors.ustc.edu.cn/gnu/emacs/windows/. Unzip to the custom directory and double-click the Addpm.exe in the Bin folder to install.1. Configure Home:Method 1: Add home system
Multi-line comment:1. Enter the command line mode, press Ctrl + V to enter the visual block mode, then press J or K to select multiple lines, and mark the lines to be annotated2. Press the uppercase letter I and insert the annotator, for example //3.
In the past, all the auto-completion functions of VIM were downloaded from the Internet when needed, and copied to their own vimrc. I didn't know what it meant, the results show that many of the methods found to be auto-complete are quite different.
When performing simple global search replacement, you can use the following ex command: : % S/which/what/g It is easy to use
%
Each row (everyline)
S
Replace (substitue)
Which
Search
Recently, we are preparing to migrate the go development environment to Linux. Because xshell SSH is used to connect to Ubuntu server, sublime cannot be used, anyway, VIM was quite familiar with it before, and it was simply transferred to VIM for
General replacement
S/old/new--- Replace the first matching item of the current row
S/old/new/g---- Replace all the matching items in the current row
Number1, number2-s/old/new/g---- Replace all the matching items from the number1 row to the number2
The script language is too strong.
My goal is to add my default code header function to vim.
1 /****************************************************************************** 2 * COPYRIGHT NOTICE 3 * Copyright (c) 2014 All rights
1. Vim Mode
Vim has three modes: general mode, edit mode, and command line mode.
2. General Mode
Open a file with vim and enter the normal mode. In this mode, you can delete characters and lines and copy and paste the file data.
2.1 move the
Vim (vi) is a commonly used editor on Linux. By default, VI (Vim) is installed in many Linux distributions ). There are many VI (Vim) commands, but if they are used flexibly, the efficiency will be greatly improved. VI is short for "Visual Interface"
The following command is used to facilitate the review of this article because it is often difficult to read books.
If you cannot find the vim command in this article, see Linux Private food page278.
Vim has three modes: general mode, edit mode,
This chapter introduces the ex editor. Why should we introduce such a new editor? In fact, the ex editor cannot be regarded as a new editor. VI is just its visual model, which is more common, line-based editor. Ex provides more mobile and range
Common Vim shortcut keys and keyboard Diagrams
Common Vim shortcut keys
H-move the cursor one character left. j-move the cursor one character down.
K-move the cursor up one character l-move the cursor down one character to 15 rows-15j
Ctrl + f-move
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service