Alibabacloud.com offers a wide variety of articles about difference between vi and vim, easily find your difference between vi and vim information here online.
Vi/vim tab key space number modification, vimtab
Change the Tap key unit
By default, the vi/vim editor compares each Tap with eight spaces.
(1) temporary changes
After opening the file with vi, enter the following command:
: Set tabstop = 4
Command definition: change t
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 editor for Unix-like system users. The first version of Vim
Vi/Vim prompts the worker who has no permission to save
Sometimes, when we use Vi/Vim to edit a file, if we do not notice the File Permission, the following error may be prompted when we finally save the file. If the user is forcibly exited, the current changes will be lost. I will share with you a method that does no
Vim/VI Practical Skills
1. Import files
: R [file name] # import to the currently edited File
For example, R/etc/inittab
The upper part of the file is the/etc/services file, and the lower part is the/etc/inittab file.
2. Run the command [do not exit VI]
:! [Command]
:! Ls-L/home/hadoop
Extended-import the command execution result to the currently edited file!
x Delete the characters under the current cursorDW Deletes the remainder of the word after the cursor.d$ the remaining portion of the line after the cursor is deleted.DD deletes the current line. the C function is the same as D, except that when the delete operation is complete, insert MODECC also deletes the current line and then enters insert MODEDelete the first character of each line :%s/^.//gI believe VI is w
Colleagues around you are either using vim or Emacs. If you use ultraedit, you are embarrassed to say hello to others. What plug-ins are there? syntax highlighting and spelling check, everything that can be opened to it is a word: Cool.
If you say so, you have to learn how to do it for half a year. Half a year! It's far from getting started. It's good to learn to move the cursor. You don't have to worry about it, it's just moving around !!!
Common Vim/Vi operations (version 2)
Colleagues around you are either using vim or Emacs. If you use ultraedit, you are embarrassed to say hello to others. What plug-ins are there? syntax highlighting and spelling check, everything that can be opened to it is a word: Cool.
If you say so, you have to learn how to do it for half a year. Half a year! It's far from g
Several differences between Vi and Vim 1. multi-level undo we know that in vi, pressing u can only undo the last command, while in vim, undo it unlimitedly. 2. ease of use vi can only run in unix, while vim can run on not only uni
off when you create a. filename.swp temporary file in the current directory, when you want to open this file here, you will be prompted if you want to restore the previous action. O is read-only for the file, E is directly edited, R is the redo before the restore operation, D is to think that this file is useless to delete this staging file, Q is to exit directly. After the operation, except D, you need to manually delete this file, or you will be prompted each time.Vim is the premium version o
When you use vi or vim to edit folder encryption, you should use wq or: x to exit when saving the disk, but sometimes you may accidentally Press: X. In this case, the system will prompt: enterencryptionkey: If you have not carefully read the prompt, for example, continue to input: x, Enterencryption...
When you use vi or vim
VI VimLinux has multiple editors, but different distribution, VI is basically supported on every distribution.Vim is an enhanced version of VI. Vim has the ability to edit the program, can be active in font color to identify the correctness of the grammar, convenient programming.Three Modes of VI:Three modes of the
ObjectiveFirst of all, the analysis of a Vim VI is a very common text editor under the Unix/linux, most of the machines have a variety of VI, on different machines commonly used in different variants of software, which vim more useful also used more widely. VIM is the abbrev
, if you use the "E" key in insert mode, the letter "E" is entered. If you want to achieve the same effect in insert mode, you need to define it as follows:This allows you to enter the "E" key in insert mode to move the cursor to the end of the current word and still remain in insert mode. However, there is a problem: You can no longer enter the text "E". If you want the character "E" to return to normal text input mode, you can use the following command: ": unmap! E "(But this command does not
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 in and set up configuration files for some important software, so at least learn more than one text editor for the command line interface. In all Linux distribut
Vi and vim Editor (8): Global replacement (1), vivim
This chapter describes the global replacement commands in the vi editor. The global replacement command can be used to automatically replace all words in the file. Generally, two ex commands are used for global replacement: ": g" (global), ": s" (substitute ).
Replacement command:
The syntax of the replace comm
expression, you can include other elements in addition to literal characters:
Character class: The POSIX character class includes keywords enclosed in [: and:].
Proofing symbols: A collation symbol is a sequence of multiple characters, but must be treated as a unit. and use [. and.] Enclose the required characters.
Equivalence class: The equivalence class lists all the character sets that should be treated as equal, enclosed in [= and =].
All three classes must appear in a
. But this way I used a few times today, I feel that there is no other ways to write the program. But I just don't want to write a program. The second method is to look for tips on the www.vim.org, the result is not two to find this article :%s/pattern//g The meaning of the is that it is used to denote a string of previous pairs, so the instructions do not change anything in the file itself. But because it's a global substitution permutation, Vim
CentOS 7 has its own VI,There are three modes of VI:Commande modeInsert modeLast line modeEnter VI vi+ file name (corresponding directory)----go to the VI Full screen editing screenAfter entering VI, is under command mode, you need to switch to insert mode below---Press the
Vi/vim is a text editor under the Unix/linux operating system.Due to the nature of unix/linux files, Vi/vim can edit any file in any format.The following are common knowledge points, for informational purposes only:
Editing mode: Vi/
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.