Iron-E / nvim-libmodal

Create new "modes" for Neovim!
Other
118 stars 7 forks source link

Make layers reusable #20

Closed itsfrank closed 1 year ago

itsfrank commented 1 year ago

Fixes #19

I extracted the functionality for removing an active mapping from :unmap into a new local function unmap_existing.

:unmap now calls this function where the code used to be, leaving :unmap unchanged.

:exit now calls unmap_existing where it used to call :unmap. This will remove the mapping from vim, but leave it in the layer's inactive mappings.

Iron-E commented 1 year ago

Just to let you know, I worked on this earlier. Just haven't pushed it yet because a kernel update broke wifi and I put off fixing it.

Once I get wifi working I'll ping you, will be good to have you double check it suits your needs before a merge

Honestly I think I like this solution better.

itsfrank commented 1 year ago

Oh cool, yeah I had some free time this evening and got curious. Turns out it didn't seem too hard to fix so I gave it a shot.

I'll mark as ready for review, let me know if there's anything I missed

Iron-E commented 1 year ago

Sorry for the delay, something urgent came up.

It seems merging is blocked because commits must be signed to be admitted into the master branch— do you have commit signing set up @itsFrank ?

itsfrank commented 1 year ago

Sorry for the force pushes, had to get signing set up. But I think it worked? Had to FP twice because the 1st commit was using a different email.

Iron-E commented 1 year ago

Perfect! Thanks for getting that working.