Closed meijieru closed 2 years ago
It is possible to copy over the cmap
s to the input modal, but it feels a little weird to me. The original input method uses cmap
because it's happening in the command line. This window isn't the command line, it's just serving a purpose that was previously only done through the command line. I just added a specific filetype for the buffer (DressingInput
) that will make it easy to add custom mappings. Will that work for you or do you really want all your cmap
s available in the modal?
It may help. Currently, I use tpope/vim-rsi so it would be better to enable them in simple way. Maybe some presets could be provided?
It looks like all of those cnoremaps have corresponding inoremaps. Is that not working? If your imaps aren't showing up in the modal that would certainly be a bug
At least the following doesn't work
<c-a>
: it always inserts to the first character. For example, having text "abc", press <c-a>
, insert "xyz", it would be "zyxabc"<c-e>
does nothing.Okay, I'll test out that plugin and see if I can figure out what's going on
Turns out this is a bug in Neovim. There are several issues currently affecting the prompt buffer, the <c-a>
causing text to be reversed is one, <c-a>
breaking <c-e>
is another (it works until you <c-a>
), and there's a whole host of other problems. Fortunately there is a PR up that fixes everything (I built locally and verified). Unfortunately that means that the prompt buffer is going to be super hosed until the next neovim release, which might be a while.
I'm going to take a crack at re-implementing the input modal without using the prompt buffer. I think that's going to be the only way to avoid these issues for now.
Alright, I have switched the default implementation of input
to not use the prompt buffer. It will also look a little different because the "prompt" text will appear in the window border rather than at the beginning of the buffer. Other than that, the functionality should be the same. For anyone else reading this, you can go back to the prompt buffer implementation by setting prompt_buffer = true
in the settings.
Let me know if this fixes things for you
It works for me. Thx!
For anyone reading this now, prompt_buffer
is no longer a setting (https://github.com/stevearc/dressing.nvim/commit/f487c89b56e5fb4b86d50b5b136402089e0958c7).
The original input method seems compatible with the
cmap
. It would be helpful to have them here.