Open mattuylee opened 3 years ago
Try this instead:
{
"vim.insertModeKeyBindings": [
{
"before": [
"<C-i>"
],
"after": [
"<Esc>"
]
}
]
}
Try this instead:
{ "vim.insertModeKeyBindings": [ { "before": [ "<C-i>" ], "after": [ "<Esc>" ] } ] }
But how can I execute some commands such as hide intelligence suggestion at the same time?
Since command extension.vim_escape
works in previous versions, I think this is a bug, probably.
Does mapping with <Esc>
not close intellisense suggestions?
I'm also having this issue. Currently reflow (gq
) doesn't work well with multibyte characters (https://github.com/VSCodeVim/Vim/issues/2686), so I want to run rewrap.rewrapComment
command provided by Rewrap extension with gq
. The following setting
"vim.visualModeKeyBindings": [
{
"before": ["g", "q"],
"commands": ["rewrap.rewrapComment"]
}
],
does reflow text as expected, but after reflowing it's still in visual mode. I want to cancel the visual mode (as in Vim) so I tried executing extension.vim_escape
in this bindings:
"vim.visualModeKeyBindings": [
{
"before": ["g", "q"],
"commands": [
"rewrap.rewrapComment",
"extension.vim_escape"
]
}
],
but unfortunately this didn't cancel visual mode.
(May not related but) interestingly, running cancelSelection
→ extension.vim_escape
combo twice
"vim.visualModeKeyBindings": [
{
"before": ["g", "q"],
"commands": [
"rewrap.rewrapComment",
"cancelSelection",
"extension.vim_escape",
"cancelSelection",
"extension.vim_escape"
]
}
],
once removes selection in appearance, but still in visual mode (moving cursor again produces the visual selection as if nothing had happened).
Does mapping with
<Esc>
not close intellisense suggestions?
Yeah it does. But it doesn't close parameter hints which command closeParameterHints
does.
Well, I have other solution to adapt to this. But in my opinion, providing command extension.vim_escape
makes the configuration much more flexible. Since it has been implemented in previous version, why not fix it in current version?
Since it has been implemented in previous version, why not fix it in current version?
Fair enough, I'll re-open, though I'm not sure if this is explicitly supported.
But it doesn't close parameter hints which command closeParameterHints does.
Can you explain exactly what you mean by "parameter hints"? This sounds like something <Esc>
should handle by default.
Thank you very much.
This sounds like something
should handle by default.
Yes. pressing Esc
will close parameter hints. But if you want to change vim mode to normal
at same time, you have to press Esc
twice. And, Esc
is too far.
Can you explain exactly what you mean by "parameter hints"?
The following two gif pics describe the problem that it doesn't close parameter hints.
In this picture, I mapped Ctrl+i
to Esc
, and after the parameter hint appears, I pressed Ctrl+i
:
But what interests me is, if there is no character between the parentheses, it works normally. In this picture, I didn't change any config:
So I have to use a command to make it work in any case:
{
// setting.json
"vim.insertModeKeyBindings": [
{
"before": ["<C-i>"],
// "after": ["<Esc>"],
"commands": [
"closeParameterHints",
"extension.vim_escape"
]
}
]
}
Hmm, all this works for me, even when mapping <C-i>
to <Esc>
. We started explicitly closing parameter hints in https://github.com/VSCodeVim/Vim/commit/1a55f891c7364ba705654a3dc815d4f36cd8d749
Would you mind posting the rest of your settings, please?
I am sorry for that. It's my fault because I am using an obsolete version which was released at on July 2020.
In my case now I can just map <C-i>
to <Esc>
. But the command extension.vim_escapse
still not works. Maybe this feature is also needed somewhere else such as for statiolake's case. I hope it could be fixed if it won't take too much effort.
By the way, the reason why I am using an old version is, after v1.16.0, mapping yank(copy) action to the global clipboard doesn't work.
Try the following to reproduce:
// settings.json
{
"vim.visualModeKeyBindings": [
{
"before": ["y"],
"after": ["\"", "+", "y"]
}
]
}
When I press y
in visual mode, the extension will lose response for any key input.
Er, should I open a new issue instead?
Describe the bug the command "extension.vim_escape" doesn't work since version 1.18.0, and falling back to version 1.16.0 could fix this.
To Reproduce
i
to get into insert mode, then enterControl + I
Expected behavior Vim mode should change to normal mode.
Environment (please complete the following information):