Possible Duplicate:
Add increase/decrease tab indent buttons to the editor toolbar

When posting code inside a list you need to indent it by an additional level, i.e. 8 instead of just 4 spaces. The CTRL+K shortcut and the Code button of the editor use the regular 4-space indentation though which is annoying since it requires indenting all the code manually.

  • This is a very well-known issue. Commented Mar 20, 2012 at 11:54
  • 3
    Doesn't make it less annoying :) Commented Mar 20, 2012 at 13:41

1 Answer 1


As a workaround:

  • Format your code using Ctrl-K:

    - List item
         Code line 1
         Code line 2
  • Add a dummy character at the very start of the first (formatted) line:

    - List item
    x     Code line 1
         Code line 2
  • Select all lines of code, hit Ctrl-K again.

  • Remove the dummy character:

    - List item
            And easier than letting the editor guess what you want...

Not the answer you're looking for? Browse other questions tagged .