4

Is there any more convenient way to write code? When I have a longer log, I dont want to space every line because it would take very long. I thought that using the <code> tag would help. But that results in:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sollicitudin tortor nec dignissim maximus. Maecenas imperdiet auctor dapibus. Duis efficitur elit et arcu pulvinar placerat. Vivamus sed fringilla sapien. Aenean laoreet lacus ut nulla eleifend lacinia. Mauris laoreet luctus luctus. Nam ullamcorper tellus non magna eleifend, id scelerisque lorem consequat. Duis a libero a urna aliquam sagittis. Vestibulum id orci eu ex consectetur auctor. Phasellus facilisis interdum fermentum.

I would like something not this thin like the usual space:

example

1 Answer 1

5

There's no other way to create block code formatting other than to prepend each line with four spaces. The easiest way to do this is to highlight all the lines, then press command-K.

There are numerous feature requests on Meta.SE to support ```, however this has not been implemented yet. CommonMark support appears to be coming in the near future which would support this.

2
  • Thanks for the tip :) Is there command K alternative on iOS?
    – John K
    Commented Jun 15, 2015 at 9:12
  • 1
    @TheBro21 On the iOS app, there's a code button on the toolbar. On the desktop web, there's a button on the editor toolbar. On mobile web, there's currently no feature for this.
    – grg Mod
    Commented Jun 15, 2015 at 9:14

You must log in to answer this question.

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