Skip to content

Conversation

Pranav2612000
Copy link

What does this PR do?

  • Adds default keybindings gt for navigating to the next tab and gT for navigating to the previous tab in markdown viewer mode

Why do we need this change?

  • While previewing markdown files, the default vim bindings (gt and gT) do not work for navigating between tabs. These bindings work everywhere else, which provides a non-consistent experience for the user.

How do we do this change?

  • Update the vim mode bindings to explicitly add handling for this mode

Copy link

cla-bot bot commented Oct 9, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @Pranav2612000 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@Pranav2612000
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 9, 2025
Copy link

cla-bot bot commented Oct 9, 2025

The cla-bot has been summoned, and re-checked this pull request!

@maxdeviant maxdeviant changed the title improv keybindings: add gt and gT bindings for markdownviewer mode vim: Add gt and gT bindings for Markdown preview mode Oct 9, 2025
@ConradIrwin
Copy link
Member

@Pranav2612000 thanks for this!

It turns out it didn't work quite right because the preview component is not an editor, so the action didn't trigger. I've fixed that and also made the binding work on all non-Editors (like screen share, and welcome screen etc.)

@ConradIrwin ConradIrwin enabled auto-merge (squash) October 9, 2025 14:10
@zed-industries-bot
Copy link

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 49aa016

@Pranav2612000
Copy link
Author

Great! Thank you for the fix @ConradIrwin

It turns out it didn't work quite right because the preview component is not an editor, so the action didn't trigger.

Oh! Weird! Apologies for sending in the wrong fix. I tested out with a local build on a mac and it seemed to work. Doesn't the Markdown preview have the "MarkdownPreview" context ( atleast thats what logs told me ), and so the bindings should apply to it?

Anyways, the fix to make it work on all non-editors is amazing ❤️ ! Thank you very much 🙇🏾

@Pranav2612000
Copy link
Author

Pranav2612000 commented Oct 9, 2025

Ahh, I see some issues on this branch. Seem to be low priority. I'll love to work on them. Let me know what you think.

  1. Operations like 3gT which should go back multiple tabs doesn't work
  2. gT with the menu open switches tabs ( It didn't previously )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants