Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

[WIP] Make <CR> "extensible" for other plugins. #202

Closed
wants to merge 1 commit into from

Conversation

parmort
Copy link

@parmort parmort commented Sep 10, 2020

Great plugin! I realized that this plugin clobbers any prior mapping to <CR> in insert-mode. Specifically, I noticed that vim-endwise doesn't work because it maps <CR>, which this plugin clobbers in any buffer where it is activated.

When I used COC, I ran into the same problem. This comment is my solution to that problem: map a plugin mapping to the added functionality and chain that to the desired mapping.

Got every case except when the menu is visible and nothing is selected.
You have to hit <CR> twice to trigger previous mapping.
@parmort
Copy link
Author

parmort commented Sep 10, 2020

Right now, I have most of the cases worked out. The only case I can't quite figure out is when the PUM is open and nothing is selected. With the current code, I have to hit <CR> twice to engage endwise. I assume that's because of the order of the mappings, but if I change them around, I get a recursive mapping (norecurse isn't viable here, plug maps need the regular map commands).

@parmort
Copy link
Author

parmort commented Sep 10, 2020

Duplicate of #154

@parmort parmort closed this Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant