[vim/vim] runtime(erlang): Optimize operators and bitstring types (PR #20524)

0 views
Skip to first unread message

Csaba Hoch

unread,
12:09 PM (11 hours ago) 12:09 PM
to vim/vim, Subscribed

This commit makes processing the erlangOperator and erlangBitType syntax items faster.

  • erlangOperator changes:
    • Vim now parses erlangOperator faster because we define the operators individually.
    • The order of operators in erlangOperator had to be changed to make the edge cases work the same as before (for example erlangEqualsBinary).
  • erlangBitType changes:
    • Vim now parses erlangBitType faster because:
      1. Now the long \%(integer\|float\|...\) sections are preceded by "beginning of word" patterns (\<).
      2. Now we use the old regexp engine (\%#=1).

Previously when an Erlang file contained long lines with erlangOperator or erlangBitType patterns near the end, redrawing these lines was slow, and typing at the end of the line was also slow.

For example, redrawing a 1787 characters long test line is now roughly six times faster.

Fixes #5593.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20524

Commit Summary

  • d073883 runtime(erlang): Optimize operators and bitstring types

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20524@github.com>

Reply all
Reply to author
Forward
0 new messages