Closed Shatur closed 3 years ago
Thanks! I tested it and it looks very good, I'm sure it improves the user experience for many people who don't have any important insert mode mappings, but there are people (including myself) that have important insert mode mappings and these mappings are crucial for them to feel at home.
I mean vim without imap ` <c-c>
doesn't feel vim for me. Whenever I have vim mode in a product (like bash
, fish
, IPython
, etc) I spend some time to bring imap ` <c-c>
in it. There are long discussions of me and repository owners in Github or their mailing list about supporting this and fortunately they always were kind enough to instruct me to achieve this or add some features to their product so that I can achieve this. Or there is a plugin I use that automatically inserts )
whenever I type (
(same for {}
, []
, ""
, ''
, XML, HTML and JSX tags, etc)
So I think we can't simply drop insert mode mapping support. So far we can:
So to have the advantages of both worlds, I'm thinking maybe we can introduce a vim command that switches between these two worlds. Let's call this command QNVIMToggleInsertModeMappings
then user can simply create a mapping like this:
imap <SOME_KEY_SEQUENCE> <c-o>:QNVIMToggleInsertModeMappings<cr>i
imap <SOME_KEY_SEQUENCE> <c-o>:QNVIMEnableInsertModeMappings<cr>i
imap <SOME_KEY_SEQUENCE> <c-o>:QNVIMDisableInsertModeMappings<cr>i
Or maybe
imap <SOME_KEY_SEQUENCE> <plug>(QNVIMToggleInsertModeMappings)
imap <SOME_KEY_SEQUENCE> <plug>(QNVIMEnableInsertModeMappings)
imap <SOME_KEY_SEQUENCE> <plug>(QNVIMDisableInsertModeMappings)
so that the user doesn't have to deal with difficulties of running a command in insert mode and ruining undo history and we do it the hard way internally.
What do you think?
This is a good idea! I will try to implement it.
I am currently using VSCode with the Neovim extension and do not plan to return to QtCreator yet :( If someone wants to take this PR and continue the implementation, it would be great.
Continuation of #25. Closes #18. I disable event filtering for events for insert mode to allow auto-completion. This how it works in vscode-neovim. This allows to have first-class insert mode and all other Neovim modes. I think that this is a good idea since completion in IDE is very important thing :)