Skip to content

Toggle between cell types using a single key #7596

Closed
@zzra

Description

@zzra

Problem

I am consistently frustrated when using Jupyter Notebook in VIM mode due to accidentally changing the cell type and becoming stuck in the new type. Since changing from cell type to cell type is dependent on 3 keys I cannot simple repeat what I've done to change the cell type. Instead I am required to find the obscure new shortcut to do so and only that shortcut will change me to the type I want. Additionally there are extra ways to set a cell to markdown using keys '1' ... '6' which are equally frustrating given the context of a specific shortcut to switch to code.

I would greatly appreciate it if one key rotated through the cell types.

Proposed Solution

Create a function that switches cell type to the next in order.

Example:

  1. My cell type is 'Code'
  2. I click key 'anyKey'
  3. My cell type is 'Markdown'
  4. I click key 'anyKey'
  5. My cell type is 'Raw'
  6. I click key 'anyKey'
  7. My cell type is 'Code'

This can be accomplished without a dedicated key to prevent regular users from being confused by the new shortcut. Instead it will be found by confused uses when searching 'Keyboard Shortcuts' for 'Code', 'Cell', 'Type', 'Markdown', 'Raw', 'Change' or any other reasonable query/combination for changing type.

Or use a key like 'W' which hasn't been used yet.

Additional context

What this solves: simplifies user onboarding by reducing cognitive load to get started.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions