Vim has the ability to edit the program, can be active in font color to identify the correctness of the grammar, convenient programming.Here is the vim of the keyboard diagram, or very detailedUse of VimIt is basically divided into three modes,
Vim is a powerful full-screen text editor, which is the most commonly used text editor on Linux, and its role is to create, edit, display text files, vim no menus, only commands.Vim working mode$ VI myfile.msgESC back to command mode from insert
In the Linux family, the Vim editor is the system's own text editor, which is powerful and self-contained.I have small white, just contact with Linux, to modify a text file, it is not possible to operate like windows, and, worse, into the VI editor,
Vi/vimVi/vim commands for editing textCommand: VI test.txt, when test.txt does not exist, automatically create this file, execute VI test.txtThe red arrow marks the file name, indicating that it is now in command mode, and when VI is a file, most of
Vim Editor DetailedVim for File Editor: Word processorVi:visual InterfaceVim:vi improved VI's enhanced versionThere are three modes of vim:Edit mode (Command mode)Input modeLast-line modeMode conversion:Edit mode--Input mode:I: Switch to input mode
In Linux, the Vim editor is the system's own text editor, which is powerful. This vim (VI) is very simple. Note: The Linux command should be lowercase oh!Vim Editor, you can create a new file can also modify the file, the command is:
Open vim config file (e.g. sudo, or su into root mode)1.sudo VIM/ETC/VIM/VIMRCAdd a row2.set tabstop=4Exit Save3.:wq AdvancedAfter adding the following code to the. VIMRC, restart Vim to create 4 spaces by pressing TAB:Set ts=4 (Note: TS is the
:[range]s/from/to/[flags]
range: The search scope, if no range is specified, acts on but forward.
:1,10s/from/to/Indicates a search substitution between lines 1th through 10th (containing 1th, 10th lines);
Commonly used vim operation self-summary, the great god please avoid:
Vim Open Exit SaveOpen it:Open Vim Practice_1.txt directlyYou can also open vim first, after: E file pathSave:: W file nameor exit Save: wq!Exit Vim:shift+zz in Normal mode
Symptom: ^m appears when you open a text file that is edited by Windows under LinuxWhy: Move files from one system to another, and you'll encounter issues related to line breaks.Workaround:
Use regular expressions for full-text null
Vim has a lot of detailed commands, we use a number of common entry commands, enough to deal with the daily code editing work, if you need to use other commands later, it is not too late to query.Vim generally has 3 editing modes, namely insert mode,
Installation Instructions: http://www.cnblogs.com/zhcncn/p/4042926.htmlOfficial Installation Instructions: http://vimcdoc.sourceforge.net/The official has not been updated for a long time, after the successful installation, the Help document content
How to move the cursor
h or LEFT ARROW key (←)
The cursor moves one character to the left
J or DOWN ARROW key (↓)
Move the cursor down one character
K or Up ARROW key (↑)
Move the cursor up
Vi/vim Text EditorGeneral mode:DD: Delete cursor when moving forwardDND: Delete n rowsU: Undo Step Up actionYY: Copy when moving forwardP: Pastex: Delete a letterDW: Delete a wordYW: Copy a wordshift+^: Moving to the Wardrobeshift+$: Move to Row
Xu Liugen
Source:
http://blog.csdn.net/xlgen157387/article/details/53184811
Vim is a kind of vi-like text editor, but on the basis of VI added a lot of new features, Vim is generally respected as the best of the Class VI editor, in fact,
Vim Install yum install-y vimVim View basic information vim--versionVim Open and new file vim [filename]Vim operation after entering the fileNote: There are several modes of vim first1, shortcut key mode: Vim can only move the cursor up or down
Vi Visual Interface Bill JOY,S.U.N SPARC SunOS (Solaris)Vim:vi improvedModal Editor:Edit mode (Command mode):----> Default mode of operationLast-line mode:---->Input mode (insert mode):---->Replacement mode:---->Visualization mode:---->How to open
Vim is set to automatically add spaces to the left and right sides of the operation symbols such as =+-. The original VIM does not have this function, write code such as Z=x+y, not beautiful, many compilers (such as VS) can automatically add space
First step: Determine if vim-enhanced is installed. Basically it's going to be all set up.650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8D/C2/wKioL1iqhvXQZ1f1AAAN6t1vy8s303.png-wh_500x0-wm_ 3-wmp_4-s_1923976390.png "title=" Qq2017022014
The following prompt appears during installation:There are no packages available for Vim now, but it is referenced by other packages.This may mean that the missing package may have been discarded,Or can only be found in other publishing sourcesE:
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