Files
neovim/runtime
zeertzjq c10a827289 vim-patch:c6705b2: runtime(erlang): Optimize operators and bitstring types (#40278)
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:  vim/vim#5593
closes: vim/vim#20524

c6705b2c3e

Co-authored-by: Csaba Hoch <csaba.hoch@gmail.com>
2026-06-16 09:12:22 +08:00
..