Fork me on GitHub

How can I paste code without parinfer rebalancing all parens ?


I don’t use parinfer, but from the name, it sounds like that’s exactly what it does. You could just turn it off


Parinfer infers where the parens should go based on the position of characters. So I assume you would have to write an Emacs lisp function to wrap the paste command that disables parinfer, then calls the usual past command and then enables parinfer again. Although I assume parinfer will still update the pasted code at some point, especially if you edit it. I prefer using structured editing as I like to control the structure of my code. I use smartparens in strict mode, it works very well and is unobtrusive


Thanks for the pointers!