📜 ⬆️ ⬇️

Beta version Vim 7.4 released

Yesterday, July 6, 2013, Bram Moolenaar announced the release of the first beta version of Vim 7.4: one of the world's best text editors * nix.
The most significant change in the new version is the new regular expression engine. Python support has also been greatly improved.

Changes:

New regular expression engine


The engine, now called the old one, uses an algorithm based on returns. He tries to match the text of the regular expression in one way, and if he fails, he goes back and tries to use another method (translation : h new-regexp-engine ). This algorithm works well with simple regular expressions, but more complex ones can work too long on long texts.
The new engine uses a state machine. It checks all possible alternatives for the given symbol and saves the possible states of the regular expression. This approach works slightly slower on simple regular expressions, but it is also very fast when working with complex expressions and long texts.
This change is most noticeable when viewing Javascript and XML files containing long lines: now Vim works at a normal speed in these cases, whereas earlier you could see strong brakes.

At the moment, the engine is quite stable, but even now sometimes find complex regular expressions that change their behavior when using a new engine. Deleting the old engine from the Vim source code is not planned: on the contrary, Bram said that he would like to make a certain heuristic analyzer that will select the engine that will quickly work out the regular expression.
It should also be noted that the new engine based on non-deterministic finite state machine is the only popular engine supporting lookbehind of unlimited length. However, to improve performance, it is recommended to directly indicate what the maximum number of characters can correspond to the lookbehind subexpression.
To select a specific engine, you can use the 'regexpengine' setting (changes the used engine for all new regular expressions) or / \% # = at the beginning of the expression (changes the engine for this expression).

More interoperability between Vim and the Python built-in interpreter



Other changes


(changes from version 7.3.000 are indicated)

')

Source: https://habr.com/ru/post/185800/


All Articles