Learn VI and VIM Editor: VI features overview of similar products

Source: Internet
Author: User

This chapter will learn about the related functions provided by the VI similar products.

All of them are my brothers:

There are many kinds of vi editors that can be freely obtained. The VI and VIM editor focuses on the Vim editor, as well as a brief introduction to three other commonly used similar products: Nvi,elvis,vile. These same products offer many extensions beyond VI, although the methods may vary, but these products often offer the same extended functionality. This article will provide an overview of the extended functionality offered by these similar products.

Multi-window editing: You can split the screen into multiple "windows" to edit different files in each window, or to observe different parts of the same file. This makes it easier to work in multiple files at the same time, and it's easier to clip text between files.

Graphical user interface: In addition to NVI, all similar products can be compiled to support the X Window interface.

Extended Regular Expressions: previously learned in the VI editor available for search and replace modes the regular expression meta-character. Each of these products offers some form of extended regular expression, but the "flavor" of each extension is different.

Enhanced Tags: The "exuberant Ctags" program is a similar product of ctags. More powerful than the Ctags feature on UNIX. can produce extended tags file format, so that the search and match the label processing more flexible, more powerful. Here are the features of "exuberant ctags":

    • Lists the list of selected objects in the source file used for human reading;
    • support for the generation of GNU Emacs-style label file;

The traditional tags file has three tab-delimited fields: the label name (typically an identifier), the source file that contains the label, and the indicator where the identifier can be found. The indicator can be a simple line number, or a nomagic search pattern enclosed by a slash or question mark. The new format is backwards compatible with the traditional format. The previous three fields are still the same: label, file name and search mode. exuberant ctags only generates a search pattern, not arbitrary commands. The extended properties are placed in a delimited ";" "After the delimiter. The properties are separated by a tab character, each property consists of two sub-fields separated by colons, the first subfield is the keyword that describes the property, the default is kind (which can be omitted at this time), and the second is the actual value. the extended ctags keyword can be referenced in the VI and Vim editor p144. As shown, an example of extending the tags file:

The initialization tag that starts with "!_tag_" in front of the tags file is useful for identifying the program that created the file. And the editor may also use these special tags to implement special functions. Then there is the corresponding label definition.

tag stack: Each type of VI is expanded to maintain the function of the label stack. each time through the ": Tag" command or the "^" In VI "When the command searches for a label, the editor saves the current location first. You can then use the VI Editor's "CTRL + T" command or the ex command to return to the saved position. Vim's label stack feature will be further studied in subsequent articles.

Improved editing tools: all of the same products are available with Edit ex command line, unlimited undo, arbitrary lengths of rows with eight-bit data, incremental search, scrolling the screen from left to right instead of wrapping too long lines, visual mode, and other features such as pattern indicators.

Programming Assistance:

VI is an editor developed for programmers, it provides a number of features, makes it easier for traditional UNIX programmers (people who write C programs and troff documents) to work. VI's similar products on this basis, provides more features:

Edit-Compile Acceleration: During compilation, you do not have to leave the editor at all, and you can get the output of the compiler and automatically jump to the line that contains the error.

syntax Highlighting: different syntax elements in your code are displayed in different colors and fonts.


This chapter VI command summarizes:

This chapter mainly introduces the extended functions provided by some VI similar products (vim,nvi,elvis,vile). Subsequent articles will focus on learning the various extensions of the VIM editor.


Learn VI and VIM Editor: VI features overview of similar products

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.