wion / tWriter.tmbundle

An extended Textile bundle for TextMate.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grammar scope: Need support for `bc..` tag

wion opened this issue · comments

commented

While the bc. tag now works, support for the bc.. (multi-blocks) tag needs added. This requires figuring out how to continue the presentation on block code across line breaks until escaped, typically with a different Textile tag (e.g. p., hn., etc).

commented

This now works. Only thing needed was to account for the extra dot in the block code scope. The continuing code block behaviour already worked, I just happened to discover it by accident. ;)

tWriter quotes and code

To do the multi-block dance:

  1. Type the @bc..@ tag (two dots) and the first block of code, as normal.
  2. Hit in series:
    1. Return ⮐
    2. Tab ⇥
    3. Return ⮐
  3. Type second block (or paste what you have), and so on until end of the last block.
  4. Hit in series to exit the tab and end the multi-block capture:
    1. Return
    2. Backspace ←

There is no distinction between the bc. and the bc.. blocks, in fact. You just have to be careful that you use the right number of tag dots when transferring to Textpattern.

Also, in Textpattern, to truly escape the multi-blocks, a new block element starting with a dot tag (p., hn., etc) must be used, so might as well get in habit of adding it in the .textile draft article.

commented

Reopening, because it would be nice if step 2.ii in previous post (making the tabbed and active position) happened automatically when conducting the initial carriage return (2.i) for bc.. context.

But I don't know how to do it.

Anyone?

Same for #13, and similar situation for #9