Compile and install Vim8.0 in Linux, and compile vim8.0 in linux.

Source: Internet
Author: User

Compile and install Vim8.0 in Linux, and compile vim8.0 in linux.

What is Vim?

Vim is a deep-improved version of the classic UNIX editor Vi. It provides many functions, including Multilevel revocation, format highlighting, command line history, online help, spelling check, file name completion, block operations, script support, and so on. In addition to the character interface version, it also has a graphical interface version (such as gVim ). Although Vi is still being maintained, most people are only using Vim. Most of what you see and hear is Vim-although your command name may be Vi.

This editor is often used by programmers, system administrators, and hackers for programming and text editing. Unlike some editors, all its commands use normal keyboard characters. Therefore, your input and operation speed is very fast under your flying fingers. Of course, you can also map function keys to some commands, or even support the mouse.

Besides Linux, Vim can run on MS-Windows (NT, 2000, XP, Vista, 7, 8, 10), apple, VMS, and almost all UNIX branches. Earlier versions of Vim can also run on MS-DOS, MS-Windows 95/98/Me, Amiga DOS, Atari MiNT, BeOS, risc OS, and OS/2, however, the new version is no longer supported.

Vim major updates

In version 8.0, apart from a lot of detail improvements and bug fixes, it mainly supports the following new features:

Supports asynchronous I/O and channel

Vim can now interact with other processes in the background. In this way, you can develop a backend server and send the result back to Vim. This interaction method is called channel. The channel uses JSON to transmit messages. Therefore, you can use any language to develop backend servers. You only need to support JSON. By supporting this technology, you can implement some plug-ins with complex functions.

Task

Vim can now start a task and communicate with it or stop it. For example, you can start a process for Automatic completion and format check. Communication between the task and Vim is completed through a channel.

Timer

Another asynchronous operation is the timer, which can start a timer and repeatedly call a function. For example, let tempTimer = timer_start (4000, 'checktemp ').

Partial

Vim already has a Funcref function, which is a function reference. Partial is also a function reference, but it can be bound with parameters or dictionaries. This is useful for channel or timer callback. For example, let tempTimer = timer_start (4000, function ('checktemp ', ['out']).

Lambda and closures

Lambda is the fastest way to create a function, such as {args-> expr }. It is useful for filter () and map (), and also supports function parameters. For example, call filter (mylist, {idx, val-> val> 20 }).

Lambda can use variables within the scope of a lambda expression, which is often referred to as closure.

Plug-in package

More and more plug-ins are available. To better manage plug-ins, plug-ins support plug-ins.

Window ID

Previously, windows in Vim can only be accessed by number. When a window is opened, closed, or moved, this number also changes. Now each window has a unique ID, which can be found more conveniently.

Line indent

The new 'breakindent 'option ensures that the indentation remains unchanged when the line is broken.

Windows: DirectX supported

The new 'Render options' option can be switched to the DirectX (DirectWrite) engine on Windows.

Supports GTK + 3

It is difficult for users to notice the difference between GTK + 3 and GTK + 2. Both configurations are still supported.

Vim for UNIX/LinuxDownload:

Source code and runtime files: ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2

.Tar.bz2 compilation and Installation

Unzip: tar jxf vim-8.0.tar.bz2 switch Directory: cd/vim80/src configuration:./configure

Note: During the configuration process (check dependencies), you may encounter the following problems:

no terminal library foundchecking for tgetent()… configure: error: NOT FOUND!      You need to install a terminal library; for example ncurses.      Or specify the name of the library with –with-tlib.

Ncurses is an old library

Solution: sudo apt install libncurses5-dev

Compile: make installation: make install

In this way, enter vim to access the terminal.

Vim documentation and help

For beginners, there is a one-hour tutorial called vimtutor (of course, in English). Please learn more through: help tutor.

One of the best ways to learn Vim is to use: help in Vim. If you do not have a Vim binary program, you can also look at runtime/doc/help.txt, it provides guidance on other documents. Like a book, this user manual is recommended for learning Vim. For details, see help user-manual.

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.