-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
odd default <Esc> key binding #74
Comments
Thank you for your feedback. Perhaps you're right. Probably i shouldn't have put the ctrl+c as default escape key binding (although it's valid VIM escape key by default too, but behaves slightly different than Esc in few situations). The main reason is the I'll test and add |
Any objection to also add @asvetliakov BTW, really great work on this extension! It's a huge relief coming from VScodevim (which had really bad performance/undo/etc. bugs). |
Any chance this can be modified with Neovim's init.vim file? I usually use |
That was my follow up question but I figured I should create a separate issue. I tried repeating my init.vim by entering |
haha Good to know! I have used vim for years but I only know the keys / commands that I use regularly. I did not know about |
@justinmk Thank you for making this possible! no, nothing is preventing of adding @bad5ect0r |
I guess it's something worth getting used to if you want to use this plugin. Will change my regular vim files to also use Ctrl-C. |
@bad5ect0r |
{
"key": "j j",
"command": "vscode-neovim.escape",
"when": "editorTextFocus && neovim.mode == insert"
}
Scratch that! I should have read the rest of his post. The |
@gforceg @bad5ect0r I may have one idea how to make |
So does that mean that a good neovim-ESC [
// https://github.com/asvetliakov/vscode-neovim/issues/74
{"key": "Escape", "command": "vscode-neovim.escape", "when": "editorTextFocus && neovim.mode == insert"}
] This wouldn't run if I disabled or removed Is the |
Yes, correct
I haven't tested, but I think neovim.mode check should prevent running this command (it'll be undefined) if you have removed the extension.
Yes. Otherwise you might get strange effects when focused out from the editor, e.g focused in file explorer |
I'd greatly appreciate if you would investigate a solution compatible for both Mode switching is too important to ignore any of the major solutions/combinations out there. I'd go so far as to say it's a dealbreaker. |
@docwhat A better keybinding is:
Pressing Esc in any mode other than "normal" should take us out of that mode. |
A little off-topic, but these should probably be added as well: {
"key": "ctrl+n",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+n",
"command": "workbench.action.quickOpenSelectNext",
"when": "!editorFocus"
},
{
"key": "ctrl+p",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "!editorFocus"
} So I can use |
It makes sense to me to have defaults for anything that works in neovim, which includes |
At least explain how to specify a different keybinding in the README. Not being as familiar with vscode plugin architecture, I assumed |
Thanks a lot! This puzzled me for a big while. I didn't see the added instruction in the README. Maybe a newer version is not released yet? Would it be good to keep this issue open until a newer version is available? |
@pluskid |
This extension is great. I like that I can use real vim while interfacing w/ VS Code but I had a difficult time figuring out how to exit insert mode because the Escape key does nothing by default. The
Ctrl + C
mentioned in the README.md did not pop out at me when I was reading about the extension and it took a while to figure out how to add the Escape key binding.I'm curious, why bind
Ctrl + C
to<Esc>
rather than bindingEscape
to<Esc>
? I ended up working around this by adding this to my keybindings:I figure there's probably a good reason why you did not use the default key for
<Esc>
I'm just curious as to why.The text was updated successfully, but these errors were encountered: