Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parinfer_mode when pasting code #25

Open
nirrub opened this issue May 28, 2018 · 3 comments
Open

parinfer_mode when pasting code #25

nirrub opened this issue May 28, 2018 · 3 comments

Comments

@nirrub
Copy link

nirrub commented May 28, 2018

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

@matthias-margush
Copy link

This also happens to me, and seems like a good idea. Any thoughts @eraserhd?

@eraserhd
Copy link
Owner

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?

@kkharji
Copy link

kkharji commented Dec 4, 2020

+1. I guess a toggling between ParinferOn and ParinferOff when hitting p/P would be a sufficient solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants