Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2021-01-13 15:48:54

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Thanks, I will try these CL tricks. I’m not a jockey, admittedly.

Bloke wrote #328156:

As far as exporting to a GitHub repo, if all the settings and doohicky are stored in that one file then simply setting up a bare Git repo somewhere, linking it to a repo on GitHub, and then copying that file into your local repo to then do the add/commit/push dance will publish it.

It occurs to me maybe I’m coming at this the wrong way. If the managed Textile bundle is already on GitHub, maybe I fork/clone/checkout (probably fork, I guess) that one and work isolated there. Then download that code bundle and… Well then the question is, how to import it. ;)

Offline

#14 2021-01-13 16:02:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,244
Website GitHub

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Destry wrote #328158:

If the managed Textile bundle is already on GitHub, maybe I fork/clone/checkout (probably fork, I guess) that one and work isolated there. Then download that code bundle and… Well then the question is, how to import it. ;)

Presumably copy the file out of your repo into ~/Library/Application\ Support/TextMate/Managed/Bundles and get TextMate to rescan for bundles (or restart the app so it sweeps that dir for changes?)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#15 2021-01-13 16:08:55

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Bloke wrote #328156:

Will fail unless you cd [to directory] first :)

% cd ~/Library/Application\ Support/TextMate/Managed/Bundles/Textile.tmbundle
% ls
Changes.json	Macros		README.mdown	Support		info.plist
Commands	Preferences	Snippets	Syntaxes

Woo-hoo!

If there are odd characters in filenames, the Tab key normally helps me out

% cd ~/Library/Application\ Support/TextMate/Bundles
% ls
Destry???s Bundle.tmbundle
% mv Destry’s\ Bundle.tmbundle tWriter
% ls
tWriter

Woo-hoo!

Thanks, Bloke!

The little things.

Offline

#16 2021-01-13 16:14:19

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Bloke wrote #328160:

Presumably copy the file out of your repo into ~/Library/Application\ Support/TextMate/Managed/Bundles and get TextMate to rescan for bundles (or restart the app so it sweeps that dir for changes?)

Yeah, that’s probably right. Though the path would be the other safe (non-managed) directory, I think:

~/Library/Application Support/TextMate/Bundles/

And then just a relaunch of the app.

Offline

#17 2021-01-13 22:53:44

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Destry wrote #328161:

% mv Destry’s\ Bundle.tmbundle tWriter

That didn’t turn out as expected. It made the name of the bundle disappear from the Bundles Editor list, even though it’s the same new name. No way to see or edit it inside the app now. Maybe my OS is too old, or maybe an empty bundle didn’t merit being acknowledged by the app. Not sure, but it makes it hard to work on the bundle via the editor. It also makes me think that initially creating bundles via the Bundles Editor is not the way to go after all; rather, I’ll try it using option 2, cloning an existing managed bundle.

Cloning has the advantage, if it proves to work, of getting all the dope in one quick shot to start with, rather than the tedious copy/paste dance of each bundle component at a time via the Bundles editor. Easier to remove and edit from there, in theory.

Back to the lab…

Offline

#18 2021-01-13 23:26:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,244
Website GitHub

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Destry wrote #328164:

That [mv] didn’t turn out as expected. It made the name of the bundle disappear from the Bundles Editor list, even though it’s the same new name.

Then my (wild, yet educated) guess is that there’s some internal config file or mapping of names -> filenames inside TextMate. When you set it up in the app, it must create the file and keep a note of it so it’s linked to the name you give it. By renaming the file outside of TM, you perhaps broke the map link so it can’t find it.

Last edited by Bloke (2021-01-13 23:27:40)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#19 2021-01-29 09:29:38

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

I’ve been chipping away at this TextMate thing to write articles using Textile with an iA Writer experience (as close as I can manage). I basically copied the standard Textile bundle (so it can be shared, possibly), extended the language grammar to account for a lot of missing Textile syntax, and created specific light and dark themes for the bundle modelled after iA Writer. I’ve a few things to figure out still, and some I may never, but I’ve got to a point where it is quite nice (and enjoyable). I already consider it a success. I should have done this years ago. No more drafting in the Write panel for me. ;)

I have an article, or two, soon, from the effort—hurdles and lessons learned kind of thing—from which I’ll share the bundle.

I’m wondering, though, if I should set up a repo instead, and create issues where I have to-dos, because I’m sure there are some regex things I can’t figure out or have done kind of sloppy, and maybe other people have little insights that would help.

I don’t really want to be a repo maintainer, though. Would this be something the Team might want to adopt?

jakob wrote #328033:

Many moons ago . . . Marios made: textpattern.org and . . . and this lengthy archive.org article

I’ve not looked at that bundle yet to see how it might be broken. Not that I would be able to fix it, but I’m definitely more knowledge of bundles than I was some weeks ago.

But from that ‘lengthy’ article…

The Language Grammar that drives this Bundle, spans more than 4300 lines of code and there are 86 Bundle items…

Yipes! That’s a big-ass bundle. 4300 lines of code seems a bit much for Txp tags. It might be the overall scope is too broad. If we assume that we only need to target four possible languages in a .txp template file:

  • txp (i.e. tags)
  • plugin tags (similar to txp)
  • html
  • php (?)

And further assume the syntax for php and html is already scoped in other bundles (so just need to find those scopes in standard themes)…

Then a .txp language grammar would just be filtering for groups like txp:, txp::, the attributes and values, etc. I don’t think that would require 4300 lines. The grammar for HTML is 1300 lines, and I can’t imagine it being longer than that, or even as complicated. But I could be wrong, and I probably am.

Last edited by Destry (2021-01-29 09:51:39)

Offline

#20 2021-02-12 14:54:36

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

jakob wrote #328036:

the fonts that iAWriter uses are available here.

There are four fonts there: Mono, Duo, Quattro… and a Duospace.

Duo and Duospace are not the same thing, apparently. Let’s make it confusing, right?

Mono, Duo, and Quattro all have .ttf files. Duospace offers specifically ‘Mac’ .otf files.

Before I made sense of that collection, I happened upon this Duospace at FontSquirrel, installed it, and it works fine — .otf format files as well.

But I want to try the other three fonts, because I’m doing some tests between iA Writer and TextMate. However, I can’t seem to figure out how to install fonts from that repo.

I can curl one, for example:

curl -O 'https://github.com/iaolo/iA-Fonts/blob/master/iA Writer Quattro/Static/iAWriterQuattroS-Regular.ttf'

And move it to ~/Library/Fonts, but nothing shows up in the client, nor in Font Book.

So I try downloading the font from the repo using the GUI, which asks me if I want to use Font Book. I say yes, and a Font Book popup window opens and asks me if I want to install the font, I say yes. It seems to do something, but again, no sign of the font anywhere via a client or in Font Book.

As far as I know, .ttf format should work. I have other .ttf font files installed and they show up.

What am I doing wrong, anyone?

===

On further inspection, the .ttf files seem to be empty, or something. When I click on them in Finder, I just get a .ttf file icon, and they read a size of 1KB. If I click on any other .ttf file in the library, I get a preview of the font and the size is much larger.

So, again, how the fack do you download those fonts?

Last edited by Destry (2021-02-12 15:09:09)

Offline

#21 2021-02-12 15:21:59

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Okay, it seems the only way you can download those files is to use the GUI, save it to disk without the Font Book intermediary, then move to /Fonts folder. Anything else is just a dud file. Gah

Offline

#22 2021-02-12 17:31:06

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,127
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Destry wrote #328819:

There are four fonts there: Mono, Duo, Quattro… and a Duospace.

Duo and Duospace are not the same thing, apparently. Let’s make it confusing, right?

Although almost. They are explained here and here.

As far as I understand that, Duospace came first as a counterpart to the original Nitti monospace font, and “Mono, Duo and Quattro” took that idea further and all based on IBM Plex ditching Nitti altogether (which I loved).

ttf and off both work fine on the Mac, and sometimes there are ttf-flavoured OTFs too.


TXP Builders – finely-crafted code, design and txp

Offline

#23 2021-02-13 09:40:23

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

jakob wrote #328832:

As far as I understand that, Duospace came first as a counterpart to the original Nitti monospace font, and “Mono, Duo and Quattro” took that idea further and all based on IBM Plex ditching Nitti altogether (which I loved).

I see. Yeah, there’s not much difference between Duo and Duospace, after installing and looking at them.

But I like what they are doing now by breaking out their enhancements between three families. For example, in iA Writer, Duo is used as the base editing font, but Mono is used for displayed and embedded code examples. I like that, because Mono compacts the ampersand (@), among a couple other wide characters, which Textile uses for embedded code, so it makes those stand out better from regular text and the wider design of Duo’s ampersand. Because there are different fonts, I can better replicate the iA Writer experience in TM. I’ll use Quattro in the preview screen, but that will come later.

Anyway, I’m just about ready to post a write up on the new tWriter bundle and make it available. I’m trying to decide whether to do that at the wion origin, or at Full Point as the first (and perhaps only) expository entry. I don’t expect much tech-oriented content there, but one for expository would be okay to get a third FP issue registered. ;)

I’d be happy to have two or three beta readers, if anyone I know is interested. I think there’s a plugin for giving a temporary hidden link to an article? Anyone recall what that is?

Last edited by Destry (2021-02-13 09:44:51)

Offline

#24 2021-02-17 13:47:16

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,744
Website

Re: A TextMate Textile bundle for Txp articles w/ iA Writer aesthetic

Gettin’ there.

I cannot tell you how nice it is to use TextMate now, or how happy I am to finally have a decent writing aesthetic for Textile. After all these many years. It only took me the better part of six weeks and a crash study of regex, but it’s getting there!

Write up posted later today, hopefully, but the turkey’s done when it’s done. I won’t announce it again. Keep an eye on Notes, if you care.

More sample images in the repo ReadMe.

Last edited by Destry (2021-02-17 14:48:28)

Offline

Board footer

Powered by FluxBB