-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adopt latest list navigation support #3432
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
Conversation
extension.ts
Outdated
@@ -360,6 +360,8 @@ export async function activate(context: vscode.ExtensionContext) { | |||
} | |||
|
|||
await Promise.all([ | |||
// This is in order to disable automatic keyboard navigation in lists | |||
vscode.commands.executeCommand('setContext', 'listAutomaticKeyboardNavigation', false), |
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 ended up wrapping this as we've found that setContext
sometimes takes awhile to complete. It doesn't make much difference in this context, but to follow with the pattern, can you call:
await VsCodeContext.Set('listAutomaticKeyboardNavigation', false);
package.json
Outdated
@@ -718,5 +723,10 @@ | |||
"tslint": "5.12.1", | |||
"typescript": "3.2.4", | |||
"vscode": "1.1.28" | |||
}, | |||
"__metadata": { |
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.
Ohh, secret fields -- what is this?
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.
D'oh! Can't believe I let this slip. 🤦♂️ Just some gallery metadata.
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.
Yikes, you'll likely have conflicts -- I just moved some stuff around earlier today.
No worries, I'll push new commits and resolve asap. |
@jpoon Alright, merged and cleaned up! 👍 |
Travis tests have failedHey @joaomoreno, Node.js: 8if [[ $(git diff-index HEAD -- *.js *.ts *.md) ]]; then git diff; echo "Prettier Failed. Run `gulp forceprettier` and commit changes to resolve."; exit 1; fi
TravisBuddy Request Identifier: 8cb8ac10-25fc-11e9-a660-67a7bedcbb29 |
Ahah I even created a commit which left those bad whitespaces in simply because I didn't want more changes in the PR. But sure, bot, I can leave them in! |
@@ -78,7 +78,7 @@ suite('Configuration', () => { | |||
}); | |||
|
|||
test('neovim disabled on missing path', async () => { | |||
assert.equal(false, srcConfiguration.configuration.enableNeovim) | |||
assert.equal(false, srcConfiguration.configuration.enableNeovim); |
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.
Yikes, thanks for fixing this.
Thanks @jpoon! 🙏 |
thanks guys! slightly off-topic: |
@bcpugh Do you have single-letter keybindings for lists regardless of using VIM? |
So when I am focused on (for example) file explorer, vim mode enabled and hit I did not get it how it works. Because I have updated VSCode and vim plugin and whenever I hit |
What was the old behaviour? |
@joaomoreno
So my question is, what this PR actually did, since in file editor it is the same behaviour as before and in file explorer (other lists) vim is not active there (was it?). |
VIM sets |
Thank you, it is clear now! Awesome job! |
We lost functionality for key binding of “a” to create new file when the file tree is focused (and other similar bindings). Only some of our team uses VIM, but I wanted to ask here since the latest VScode release notes pointed us here. Can we somehow revert back to the old behavior without installing an extension like VIM? |
@bcpugh My recommendation would be to simply switch to a keybinding with modifier key, eg Ctrl N. |
I'm very excited about this feature, awesome work, but it does not work for me. |
How can I disable this feature added by this pull request? |
This is an epic feature!! Good work!! |
@asilvadesigns Hi~ I have found how to fix your problem! |
Is there a way to disable the tree keyboard navigation without installing a plugin? |
This is a really annoying change, can we please have a way of disabling this? |
There is no need to install any plugin to disable this feature. If you just want to turn off the tree widget completely, use this setting on VS Code: "workbench.list.keyboardNavigation": "simple" |
I don't understand guys. This PR exists in order not to make keyboard filtering annoying for VIM users, who use What is annoying about this? |
@joaomoreno because you're are forcing your way of working on other people. This has nothing to do with Vim, this is an editor change that alters the tree view and not an optional one at that so we all have to have it now! When I install a Vim plugin for any given editor, I expect it to give me Vim keybindings for the editor pane, not to start changing things outside of that unless it's strictly opt-in. I wish the maintainer of this repo would limit pull requests to implement actual features of Vim and stop straying into altering the actual editor itself. |
@nomad-software Can you explain me in detail what currently doesn't work for you? |
@nomad-software I believe there is misunderstanding going on here about what this PR is about. It fixes the feature the VS Code team added to do VS Code and that was conflicting with VIM users. It doesn't add any feature to VS Code itself - the feature that adds the tree widget came directly from the VS Code team on their repo and it's not directly influenced by this repo or related to this PR. And although I agree it might have been a better choice to leave it as opt-in (or at least easier to turn off after the upgrade) it's still opt-out (as most VS Code features are). Just check my former answer:
So just to try to make things clearer: if you don't use or want to use VIM this PR does not affect you any way and there's no need or point in installing this extension. And if you want to disable the feature added to VS Code on 1.31 just use the code above. |
What this PR does / why we need it:
This PR introduces a new keybinding when in the list context (/) which invokes the
list.toggleKeyboardNavigation
in order to use the new upcoming keyboard navigation feature in VS Code 1.31.The introduction is backwards compatible since the keybinding is only enabled if
listSupportsKeyboardNavigation
is true which is the case only from 1.31 onwards.Special notes for your reviewer:
Related VS Code issue: microsoft/vscode#66995
This should be merged before VS Code 1.31 releases.