Reputation: 169
I recently met with this weird issue when I edit rst file using VIM on macOS Catalina 10.15.7:
When I try to type a parenthesis
(
or when my cursor tries to pass the parenthesis, VIM will get stuck and then the CPU fan of my laptop will run crazy. I finally figured out this issue happened after I created a ~/.vimrc file and set
syntax on
If I delete this file, this issue will disappear.
Does anyone know why this happens? And how to fix this issue meanwhile keeping VIM recognize all kinds of syntax?
Upvotes: 3
Views: 207
Reputation: 2720
I have the exact same behavior. After a bit of digging, the culprit is set regexpengine=1
. I forced this regex engine some time ago, because vim was a bit laggy for syntax highlighting.
For the moment, I just remove this setting, and see how latest vim and neovim behave.
Upvotes: 0
Reputation: 4072
It's definitely something with syntax. Adding the following to the bottom of my ~/.vimrc
seems to help.
autocmd BufRead *.rst set syntax=off
I'm on macOS 13.6 and here is my version of vim: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 23 2023 22:11:46).
Upvotes: 0