8

I would love to have an indent and dedent keys in the new Stacks Editor.

This has already been requested for the old markdown editor, but the request seems to have been ignored, and it seems like the Stacks Editor is meant to have more robust features anyways.

In addition to all the old reasons, there seems to be Stacks Editor-specific use case for a dedent button. The Stacks Editor now makes code fences its default form of code formatting, which I'm all for! However, this makes it more difficult to replace code blocks with code fences. A dedent button would make this super easy to fix.

13
  • ctrl-k may be inline code, but ctrl-m is still there for code blocks (however it won't work if a language has been specified). Commented Aug 11 at 3:55
  • 1
    @Nickistired It dos code fences instead of code blocks, to the best of my knowledge.
    – Anerdw
    Commented Aug 11 at 8:20
  • 1
    Are we really trying to bring back “dedent”?
    – beaker
    Commented Aug 11 at 13:22
  • 1
    I just checked Google’s ngram viewer, and apparently we are, so, okay…
    – beaker
    Commented Aug 11 at 13:28
  • @beaker: Would you prefer "deindent"? Commented Aug 11 at 16:44
  • 3
    @PresidentJamesK.Polk “disindent”, please :D
    – beaker
    Commented Aug 11 at 19:08
  • "I can't fix these sorts of code samples in the Staging Ground" - yes you can. You don't want to. Let's keep it honest here, this is not about whether something is possible or not, it is about inconvenience and how far you are willing to go. There is nothing stopping you from painstakingly fixing indentation using the delete button, or to copy/paste it into a rich text editor, fix indentation using dedicated features such as code cleanup or column editing there, and then putting it back.
    – Gimby
    Commented Aug 13 at 8:59
  • 1
    How often are people actually posting indented code when posting using the Stacks Editor? I don't understand how this would happen, especially with this sample that appears to show an entire Python script. Was the entire source file indented?
    – Ryan M Mod
    Commented Aug 13 at 10:00
  • @RyanM If a new user posts indented code with the markdown editor in the Ask Wizard, their post goes to Staging Ground, where it’s hard to fix.
    – Anerdw
    Commented Aug 13 at 13:14
  • 1
    @Gimby I mean, sure. But is that really a good use of anyone’s time? I personally would much rather have a built-in feature than do any of those other things. In my eyes, making such a small change shouldn’t have to be “painstaking” or require me to open a whole other program.
    – Anerdw
    Commented Aug 13 at 13:20
  • @AndrewYim the point is that hyperbole and meta don't mix. Just keep it grounded. It's demotivating to have to do frequently which would be fair enough. Do you have to do these kind of edits frequently though? Again - let's keep it honest.
    – Gimby
    Commented Aug 13 at 14:42
  • @AndrewYim I'm not sure how that answers my question about how often it occurs though. The Ask Wizard uses the Stacks Editor, so any question coming through there used the Stacks Editor, in which it's at least harder to end up with overly indented code.
    – Ryan M Mod
    Commented Aug 13 at 14:48
  • @RyanM Ok, now I'm just confused as to how this showed up in the first place. If the Ask Wizard uses the Stacks Editor, I have no idea how this user managed to get code blocks in their question. Edited the question accordingly.
    – Anerdw
    Commented Aug 13 at 14:56

0

You must log in to answer this question.

Browse other questions tagged .