Skip to content

[Codemirror 6] Tab should insert spaces, not the actual tab character #4136

Closed

Description

@khanniie

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

Similar to most web editors, and the existing p5js editor, TAB should create 2 spaces.

Expected Behavior

TAB adds a TAB character

Steps to reproduce

press TAB in the editor

Activity

  1. Nishthajain7 commented on May 30, 2026

    @Nishthajain7
    Contributor

    Can I work on this issue?

  2. khanniie commented on May 30, 2026

    @khanniie
    MemberAuthor

    @Nishthajain7 Yes, thank you so much! just to clarify, this is for the cm6 feature branch, develop-codemirror-v6 branch

  3. VaibhavNarayann commented on Jun 4, 2026

    @VaibhavNarayann
    Contributor

    Hey @khanniie, On the develop-codemirror-v6 branch, when I press TAB, the editor inserts two spaces, which matches the behavior described in the issue.

    Could you clarify what behavior you are expecting when TAB is pressed? The issue description seems a bit unclear to me, so I want to make sure I'm reproducing the correct behavior before investigating further.

    Thanks!

  4. khanniie commented on Jun 4, 2026

    @khanniie
    MemberAuthor

    Hi! that's strange, when i press tab, it inserts a TAB character. I'm on mac if that makes any difference! I've attached a screen recording here.

    @Nishthajain7 Are you still working on this issue? no worries if not, we can re-assign it, but I'd love to get this one thing in soon as we're deploying cm6 in the next couple of weeks.

    demo.mov
  5. Nishthajain7 commented on Jun 4, 2026

    @Nishthajain7
    Contributor

    Yeah I'm working on this and I'll send a PR by this weekend. Sorry for the delay.

  6. skyyash commented on Jun 8, 2026

    @skyyash
    Contributor

    hi @Nishthajain7 , just checking in. lmk if you need any help.

  7. Nishthajain7 commented on Jun 9, 2026

    @Nishthajain7
    Contributor

    Even for me, it inserts two spaces on pressing tab

  8. khanniie commented on Jun 9, 2026

    @khanniie
    MemberAuthor

    Oh weird! I can take this issue then if I'm the only one who can reproduce it

  9. added a commit that references this issue on Jun 11, 2026
    f31a3b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugError or unexpected behaviors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions