evil-unimpaired icon indicating copy to clipboard operation
evil-unimpaired copied to clipboard

implement more pasting shortcuts from vim-unimpaired

Open aleksandersumowski opened this issue 6 years ago • 1 comments

vim-unimpaired contains some extra pasting shortcuts. What would it take to implement them as part of evil-unimpaired?

I especially got used to |]p|, |[p|, |[P|, and |]P| versions of those ...

>p Paste after linewise, increasing indent. >P Paste before linewise, increasing indent. <p Paste after linewise, decreasing indent. <P Paste before linewise, decreasing indent. =p Paste after linewise, reindenting. =P Paste before linewise, reindenting.

|]p|, |[p|, |[P|, and |]P| have also been remapped to force linewise pasting, while preserving their usual indent matching behavior.

aleksandersumowski avatar Aug 01 '19 14:08 aleksandersumowski

I've been working on a first attempt at this. Adding the keybindings and required functions is straightforward, I'm just not sure to make them work without clobbering the existing keybindings on =,<,>

I suspect the easiest way to do this is with advice, but I'm not sure if that's a great way to go since we want the package to be portable across versions of evil.

I'll keep looking into it. For now, I'm working on this in the add-experimental-bindings branch.

zmaas avatar Aug 06 '19 03:08 zmaas