-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add missing window keys (<C-w><C-[hjklovq]>) #2600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tyru. Changes here make sense. If you don't mind, it'd be great if you could re-organize these ctrl+<key>
alphabetically to make it easier to read. If you could also delete any configs that are binding to more than one key combo (e.g. ctrl+w l
) that would be awesome.
package.json
Outdated
{ | ||
"key": "ctrl+h", | ||
"command": "extension.vim_navigateCtrlH", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be <C-h>
package.json
Outdated
{ | ||
"key": "ctrl+l", | ||
"command": "extension.vim_navigateCtrlL", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<C-l>
here
package.json
Outdated
{ | ||
"key": "ctrl+j", | ||
"command": "extension.vim_navigateCtrlJ", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to above.
package.json
Outdated
"key": "ctrl+j", | ||
"command": "extension.vim_navigateCtrlJ", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" | ||
}, | ||
{ | ||
"key": "ctrl+w k", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, don't think these keybindings are removed. We should only be binding to one single key combo here so any keys with ctrl+<key> <key>
don't belong here.
package.json
Outdated
{ | ||
"key": "ctrl+k", | ||
"command": "extension.vim_navigateCtrlK", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vim.use<C-k>
package.json
Outdated
{ | ||
"key": "ctrl+q", | ||
"command": "extension.vim_winCtrlQ", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vim.use<C-q>
package.json
Outdated
{ | ||
"key": "ctrl+v", | ||
"command": "extension.vim_winCtrlV", | ||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vim.use<C-w>
Should I sort only added keys, or all keys in |
Travis tests have failedHey @tyru, Node.js: 8npm test --silent;
|
If you could do all the |
package.json
Outdated
@@ -330,11 +335,6 @@ | |||
"command": "list.collapse", | |||
"when": "listFocus && !inputFocus" | |||
}, | |||
{ | |||
"key": "g g", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this one. g g
will directly call a vscode command so we need this here. mind putting it back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After removing this, gg
seems to work.
I'm new to VSCode extension development and I'm not used to package.json and what should I write to contributes.commands
. so please correct me if I'm wrong.
But unlike other VSCode extensions, I guess it's enough to lists only one key sequences here to send to VSCodeVim's state machine.
The state machine processes keys one by one, and fire the command if key sequence is matched.
Hey @tyru, TravisCI finished with status |
Okay, I'll try it :) |
Sorted |
Travis tests have failedHey @tyru, Node.js: 8npm test --silent;
|
Sent #2609. But I found another problem. Vim/test/mode/modeInsert.test.ts Line 209 in 16a2348
Removing this line passes the test, however. |
Test should pass on CI though? We need that test as we have has special logic to delete that matching The tests already have a mechanism to override the "vim" specific configurations (https://github.com/VSCodeVim/Vim/blob/master/test/testConfiguration.ts), maybe we need to do something similar for the global settings. |
package.json
Outdated
"key": "ctrl+[", | ||
"command": "extension.vim_ctrl+[", | ||
"when": "editorTextFocus && vim.active && vim.use<C-[> && !inDebugRepl" | ||
"key": "ctrl+k", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge the two ctrl+k
to
{
"key": "ctrl+k",
"command": "extension.vim_ctrl+k",
"when": "editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl"
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. how about duplicate ctrl+h
and ctrl+j
?
In the same way, I should merge like this?
{
"key": "ctrl+h",
"command": "extension.vim_ctrl+h",
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
},
{
"key": "ctrl+j",
"command": "extension.vim_ctrl+j",
"when": "editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl"
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, I didn't spot those duplicates. That looks good.
package.json
Outdated
"key": "ctrl+a", | ||
"command": "extension.vim_ctrl+a", | ||
"when": "editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl" | ||
"key": "ctrl+v", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge these two ctrl+v
as well:
{
"key": "ctrl+v",
"command": "extension.vim_ctrl+v",
"when": "editorTextFocus && vim.active && vim.use<C-v> && !inDebugRepl"
},
}, | ||
{ | ||
"key": "g g", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly certain we need this. When the explorer window is selected, pressing gg
will take you to the first item in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooops I'm sorry... entirely I didn't care the explorer window and the when
condition`.
Will restore it later.
Thanks for sorting the |
Ah, okay, forgot about that 😅 |
Okay, fixed problems 🎉 |
Travis tests have failedHey @tyru, Node.js: 8npm test --silent;
|
Thanks @jpoon for merging, now this branch is all green. All my branches are left except refactoring |
What this PR does / why we need it
Some commands are even implemented but only keymappings are missing.
This PR makes it to work just to add the keymappings to invoke the implementation.
Which issue(s) this PR fixes
Fixes #2582, #2467