emacs-evil / evil-surround

you will be surrounded (surround.vim for evil, the extensible vi layer)
Other
631 stars 61 forks source link

Add surround text objects from local keymap #165

Closed iyefrat closed 4 years ago

iyefrat commented 4 years ago

From #164.

Adds evil-surround-local-(inner|outer)-text-object-map-list, a buffer-local list of keymaps that contain the inner and outer text objects one wants to add to evil-surround. Also adds tests to make sure this works, and documentation on this in the readme.

I was a bit conflicted on making evil-surround-local-(inner|outer)-text-object-map-list a list, but this makes sense, as it lets you separate text objects from different minor modes.

I also wanted to include a test that that makes sure that the text object saved to e.g. evil-visual-state-local-map was in fact local and did not get carried over, but I couldn't catch the error of a keybinding that isn't bound to anything in ert. This however is not directly related to evil-surround so it's probably not important anyway.

Thank you for all your work on the package!

ninrod commented 4 years ago

Thank you @itai33, I'll need some days to properly check the contribution.

I don't know why travis is failling. I trust that you can run the tests locally successfully.

I think that evil-surround's travis integration needs some love. I'll check that later.

iyefrat commented 4 years ago

great! locally running make make test succeeds for me at least

ninrod commented 4 years ago

I'm trying out your branch now.

iyefrat commented 4 years ago

@ninrod Thank you for merging! Unfortunately I just noticed a typo in my additions to the readme that slipped my inspection: in the section "Add surround pairs for buffer-local text objects", near the end of the first line there is ", the do the following", which should be ", do the following". I'm writing this here because submitting another pull request for a single word typo feels like a bit much, sorry for the trouble.

Edit: oh also I missed updating the year to 2020 in the license bit of the readme

ninrod commented 4 years ago

Ok, no problem. I think that now we have travis under control.

ninrod commented 4 years ago

Don't worry, I'm already at it.