eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
546 stars 42 forks source link

Vim E578 error when creating an emtpy map, vector or list #85

Closed bhurlow closed 3 years ago

bhurlow commented 4 years ago
Error detected while processing InsertCharPre Autocommands for "<buffer=1>"..f
unction <SNR>39_event[2]..<SNR>39_process_buffer[54]..InsertCharPre Autocomman
ds for "<buffer=1>"..function <SNR>39_event[2]..<SNR>39_process_buffer:
line   49:
E578: Not allowed to change text here

vim version:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jul 27 2020 01:26:07)
macOS version
Included patches: 1-1300
Compiled by Homebrew
agorgl commented 4 years ago

Same here

bootleq commented 4 years ago

There might be some other plugins attempt to change text after opening parens. In my case Raimondi/delimitMate can cause E578 when insert (, unfortunately I didn't find a simple case to reproduce it.

You can disable such plugin when editing lisp files.

In parinfer side, catch E578 and omit it might also feasible solution.

eraserhd commented 3 years ago

This was a regression because Vim changed the error to E578 from some other number, and we were handling the other number. This is now resolved on the main branch.