Would it be possible to add an option to the edit control (used to write questions/answers) to indent the line by 4 spaces. I find myself using 4-space indentation quite often to format the code and counting spaces all the time is a bit tedious.

I would like this to work any number of times, ie. you would press the button twice to get 8 spaces, 3 times to get 12, etc.

It would be also good to have the reverse option of moving the indentation to the left by 4 spaces.

I know that any form of automated formatting was already discussed and is hard to do but that feature would at least allow some quicker editing.

I hope this is not a duplicate, I tried to search for previous questions but couldn't find anything.

  • 4
    Indent a code block already has a button {} and a keyboard shortcut Ctrl+K.
    – Mat
    Oct 6, 2013 at 10:04
  • 1
    Those two methods act as toggles also. Pressing Ctrl+k on indented code will un-indent it.
    – Lix
    Oct 6, 2013 at 10:04
  • That's ok but it only indents one time. If I want to indent by 8 spaces or more, I have to do it manually.
    – Szymon
    Oct 6, 2013 at 10:15
  • @Szymon if that's what you want, then it is a duplicate. Let me find it Oct 6, 2013 at 10:20
  • @Szymon please add this to your post, but apart of code inside lists what's the use case of such a thing? Oct 6, 2013 at 10:20
  • @ShaWizDowArd I added that bit. It would be just for the code. On SO you write and edit code quite often, don't you?
    – Szymon
    Oct 6, 2013 at 10:22
  • That's probably the best duplicate, but there are dozens of other, mostly centered around the tab button. Oct 6, 2013 at 10:24
  • @psubsee2003 Thanks. Tab button is different. OK, what should I do with my post?
    – Szymon
    Oct 6, 2013 at 10:25
  • @Szymon no, I use IDE like Visual Studio if I have large code block to post then even Notepad sometimes for minor code edits. Oct 6, 2013 at 10:26
  • @ShaWizDowArd I do that too but mostly because I am forced to as the edit control doesn't allow it.
    – Szymon
    Oct 6, 2013 at 10:29
  • @Szymon if you had trouble finding the dups, then your question will point to the dup for others. So you can leave it and let it be closed. But you can deleted it if you choose. But before choosing the delete option, don't forget that the question ban is also in effect on Meta, so it could impact your ability to post. Oct 6, 2013 at 10:30
  • @psubsee2003 I'll leave it then. I guess I'll lose a bit of rep on that one but hey, so what!
    – Szymon
    Oct 6, 2013 at 10:31
  • @psubsee2003 the post ban on Meta is active, but much more relaxed, so the OP here doesn't have anything to worry about. Oct 6, 2013 at 10:33
  • @ShaWizDowArd yeah, thanks, I was going to mention it but forgot to add that bit. Oct 6, 2013 at 10:34
  • Still, I'll leave it as it will point other people to the dup question. I guess it's better for the site.
    – Szymon
    Oct 6, 2013 at 10:36


Browse other questions tagged .