Sublime Forum

Code folding & color schemes for Markdown

#1

I generally use ST2 for HTML & CSS, but I have set it up on my netbook as a “distraction-free” editor. This means I’ve started working in Markdown format and I’ve come across two strange things:

  1. Code folding doesn’t allow you fold the content under headings. This doesn’t make sense if you’re working on anything longer than an article; you want most of the text tucked away. Can someone please verify that this is the case? If so, can a gentle soul dig in the tmLanguage file and tell me how I could change this behaviour? I had a look at it and ran away screaming.

  2. All the color schemes look terrible. Is there a sophisticated Markdown color scheme I haven’t found? (By sophisticated I mean using bold and italic, now that they are supported, toning down the Markdown markup, etc.). I’ve taken a stab at this, but it’s taking me a lot of time to learn the format – and of course it’s just an excuse not to write.

Any help on these two things would be much appreciated.

Alex

0 Likes

Collaps/expand markdown sections?
#2
  1. While it’s not automatic (which it seems you’re looking for, you can select text and press Edit > Code Folding > Fold (keybinding varies across OSs)

  2. Sublime Text supports Textmate colorschemes, so you can do a google search for “tmThemes.” For example, I use a modified version of IR_Black.

0 Likes

#3

Thanks for the reply C0D312.

  1. I’m aware of manual code folding. But wouldn’t it make sense to be able to fold code in Markdown? The semantic structure of a Markdown document is both very simple and quite rigid.

Something like: H1 (Document) -> H2-6 (Sections) -> P and other elements (Content)

I would very much like to be able to fold code at the Section level.

  1. I’ve puzzled out the .tmTheme format and put together something more-or-less acceptable (although some weirdness still abounds), but I’ve run into another problem. Bold and italic don’t seem to be applied for certain fonts. In the beginning I thought it was a problem .otf format, but it seems to be more general. I think I read somewhere – but I can’t find where – that ST2 requires the bold and the italic to occupy as much space as the regular weight. All the fonts I’ve tried are monospace, so I’m not sure if this is the problem I’ve run into.

Any ideas?

0 Likes

#4

I’m looking for this as well (Windows 8). Haven’t found anything.

Has anyone come up with a solution yet?

0 Likes

#5

[quote=“wildmind”]I’m looking for this as well (Windows 8). Haven’t found anything.

Has anyone come up with a solution yet?[/quote]

What “this” are you referring to? I have decent suggestions for all three issues raised in the thread.

0 Likes