Open nirrub opened 6 years ago
This also happens to me, and seems like a good idea. Any thoughts @eraserhd?
I'm not sure we always want paren mode for pasting. Paren mode would fail outright if the pasted code doesn't have balanced parens.
I had an idea for separate plugin that would remove and fix extra indentation in a register when yanking, and also add indentation relative to the paste point when pasting, meaning that relative indentation would be preserved instead of absolute indentation for lines 2+. Since I'm no longer using Vim, I'm not going to write that tho. So... free idea?
+1. I guess a toggling between ParinferOn
and ParinferOff
when hitting p/P would be a sufficient solution
If I copy code from an outside source that is not indented properly, when pasting into a clojure buffer with parinfer active, it'll reformat the code based on indent (smart mode) and not as 'paren' mode. I think that pasting code should, somehow, behave in 'paren' mode in order not to break the intended behaviour