Skip to content
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

VSCode Zen Mode Shortcut not working #1720

Closed
xlaech opened this issue May 19, 2017 · 16 comments
Closed

VSCode Zen Mode Shortcut not working #1720

xlaech opened this issue May 19, 2017 · 16 comments

Comments

@xlaech
Copy link
Contributor

xlaech commented May 19, 2017

In the newer versions of VSCode they added a shortcut for the Zen-Mode.
If you press ctrl+k z, the zen-mode is toggled.

However with VSCodeVim enabled, the shortcut does not work.
I do not know any ctrl+k vim shortcuts, but maybe there are. Is this behavior expected?

Environment:

  • VSCode Version: 0.7.1
  • VsCodeVim Version: 1.12.2
  • OS: Linux Mint 18 (But also, Windows, Mac)

What happened:
Nothing

What did you expect to happen:
Zen-Mode to toggle. If you remap to something else it works.

How to reproduce it:

  1. open vscode
  2. press ctrl+k z
@Chillee
Copy link
Member

Chillee commented May 19, 2017

I think we should just not capture <C-k>. We don't actually use it anywhere, but we're capturing it for w.e. reason.

@xlaech
Copy link
Contributor Author

xlaech commented May 19, 2017

Then i think, we should remove this. On mac and linux you actually have build in fullscreen modes, but on windows this is really i feature i miss (and therefore always remap).

@Chillee
Copy link
Member

Chillee commented May 19, 2017

One thing you can do is use

"vim.handleKeys": {
    "<C-k>": false
},

@xlaech
Copy link
Contributor Author

xlaech commented May 19, 2017

That is actually a better option, than changing the original shortcut. Thank you. Still it would probably better, to just not capture it in the first place.

@gaving
Copy link

gaving commented Oct 23, 2017

Oddly hit by this one, since I see the fix was made but then reverted.

Sticking the handleKeys setting in!

@Chillee
Copy link
Member

Chillee commented Oct 23, 2017

@gaving Haha it's because I thought we could do it, but it turns out that <ctrl-k> was captured for a reason: lots of people like to bind <ctrl-w> k to <ctrl-k>. At some point, re-examining how we bind keys should definitely be something we do.

@plbowers
Copy link

Just my $0.02, but if people are making a non-standard remap which is not part of normal vim, why is this reason to capture that keystroke? Since ctrl-k is a VERY standard keystroke in vscode and NOT in vim it seems like the standard behavior should be supported and people who want to do something special should figure out how to do the weird thing. Currently anybody who wants to use the usual ctrl-k stuff in vscode has to figure out a way around when that is more standard (from the standard vscode and the standard vim) than using ctrl-k as a replace for ctrl-w k...

@Chillee
Copy link
Member

Chillee commented Oct 28, 2017

@plbowers I agree that that's probably the right thing to do. Unluckily, the only way to currently do it is to modify handleKeys to set <c-k> to false. Now, maybe we should be shipping with values in it by default.

@solcanmihai
Copy link

@Chillee Could you add that to the plugin documentation, so other people will find this information easier?

@jpoon
Copy link
Member

jpoon commented Sep 4, 2018

Feel free to submit a PR.

@nathan-at-least
Copy link

Can we re-open this? Why was the fix reverted? How can I help?

I'm brand new to vscode as of yesterday. I come from vim, so I use the vim bindings. Meanwhile zen mode is awesome!

But I got hit by this issue. Since vim keybindings are a "standard feature" (by which I mean they appeared on the very first getting started screen I saw as an option, and as a vim user were a major selling point for me) and Zen Mode is also, it's quite confusing that the key binding shown right in the menu doesn't work.

It sounds like this issue was fixed in a commit and this ticket closed, then later a regression occurred.

Based on that belief, next time I have cycles, I'll attempt to learn how to re-apply the patch that makes the keybinding shown in the menu work when using VSCodeVim.

@J-Fields
Copy link
Member

@nathan-at-least you can just put "<C-k>": false into vim.handleKeys, and we'll ignore the keystroke so VSCode can handle it

@wjn
Copy link

wjn commented Oct 4, 2020

Seems to still be an issue on Friday's release:

Version: 1.49.3
Commit: 2af051012b66169dde0c4dfae3f5ef48f787ff69
Date: 2020-10-02T17:54:06.165Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 19.6.0

@serokellcao
Copy link

My 2c: if the reason why this was reverted that people rebind C-w to C-k, then surely they can reconfigure C-k to be captured.

I think that it makes sense to not clash with basic functinoality such as open directory chords that many VSCode users are used to.

@rubo77
Copy link

rubo77 commented Oct 12, 2023

In case you are stuck in zen mode, because you toggled it in the menu, you can exit it with F11 ;)

@VickyHowe
Copy link

I also had the same issue getting stuck in zen mode. Hitting escape twice or ctrl+k+z did not back out of zen mode. The F11 did the trick thanks!

Version: 1.92.2 (user setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests