Home Download Buy Blog Forum Support

Code folding & color schemes for Markdown

Code folding & color schemes for Markdown

Postby quodlibet on Sat Jan 14, 2012 3:50 pm

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
quodlibet
 
Posts: 499
Joined: Sat Jun 18, 2011 5:53 pm

Re: Code folding & color schemes Markdown

Postby C0D312 on Sat Jan 14, 2012 3:55 pm

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.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Code folding & color schemes for Markdown

Postby quodlibet on Sun Jan 15, 2012 6:04 pm

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.

2. 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?
quodlibet
 
Posts: 499
Joined: Sat Jun 18, 2011 5:53 pm

Re: Code folding & color schemes for Markdown

Postby wildmind on Fri Mar 29, 2013 12:42 pm

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

Has anyone come up with a solution yet?
wildmind
 
Posts: 1
Joined: Fri Mar 29, 2013 12:37 pm

Re: Code folding & color schemes for Markdown

Postby quodlibet on Fri Mar 29, 2013 10:58 pm

wildmind wrote:I'm looking for this as well (Windows 8). Haven't found anything.

Has anyone come up with a solution yet?


What "this" are you referring to? I have decent suggestions for all three issues raised in the thread.
quodlibet
 
Posts: 499
Joined: Sat Jun 18, 2011 5:53 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Orlmente and 22 guests