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

[Bug] Keymap sublime: toggleCommentIndented doesn't consider indents at all #1654

Open
Phroneris opened this issue Sep 6, 2023 · 2 comments

Comments

@Phroneris
Copy link

Bug Report

Bug Description

The sublime keymap has a command called toggleCommentIndented, which is generally assigned to the Ctrl+/ hotkey.

In spite of its name, this command comments out the entire line, including the spaces for indentation, rather than starting at the first indented character of the line.

CSS Code

Stylus syntax.

  1. Let's comment out the .comment-out-me line:

    @-moz-document domain("example.com")
      .dont-disturb-me
      .comment-out-me
        display: initial

    One of expected behaviors:

    @-moz-document domain("example.com")
      .dont-disturb-me
      // .comment-out-me
        display: initial

    Actual behavior:

    @-moz-document domain("example.com")
      .dont-disturb-me
    /*   .comment-out-me */
        display: initial
  2. Then let's comment out lines 3 and 4 at once:

    @-moz-document domain("example.com")
      .dont-disturb-me
      .comment-out-me
        content: "And me!"
        display: initial

    One of expected behaviors:

    @-moz-document domain("example.com")
      .dont-disturb-me
      // .comment-out-me
        // content: "And me!"
        display: initial

    Actual behavior:

    @-moz-document domain("example.com")
      .dont-disturb-me
    /*   .comment-out-me
        content: "And me!" */
        display: initial

System Information

  • OS: Windows 10 64-bit
  • Browser: Chrome 116.0.5845.141 64-bit
  • Stylus Version: 1.5.35

Additional Context

The sublime-Mac and sublime-PC keymaps cause the same result.

This is not just a problem with the name of the command, but is an inconvenience when coding in Stylus syntax.

@tophf
Copy link
Member

tophf commented Sep 6, 2023

This is how it's implemented in CodeMirror, so I'm not sure we should fix it ourselves...

@tophf tophf added the external label Sep 6, 2023
@Phroneris
Copy link
Author

Oh sad news.
Thanks. I await the day of realization.

@tophf tophf added the editor label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants