Abbreviations / acronyms

A lot of the time when I’m typing in Inform, I seem to be typing the same thing over and over again.

The brick is scenery in the house. Printed name is...

I was wondering if there was any way to abbreviate some of the typing, so instead of “is scenery in” I could type “isi” (or something similiar) and “psi” instead of “printed name is”

Inform doesn’t do any in-line code checking or auto-completion. When I’m working with an IDE like that, I often do create acronyms or short mnemonics for often used phrases and then just do a blanket Find-and-Replace before compiling it.

There’s no documented way to do this. (You could write a script to preprocess your source code and pass it to the I7 compiler, but you can’t do this in the IDE.)

It’s possible that the source-language system will eventually allow this. That is, Inform currently uses English language forms, but there are supposed to be ways to adapt this to other languages. You could then build “English-Plus” that adds some of your abbrevations.

But it’s also possible that it won’t work the way you want. Your “isi” is a verb and half of a relation phrase, and there may not be a way to package that up in a single “word”.

A specific case that might be handy:

The verb to pni means the printed name property.
The rock is in the Kitchen. The rock pnis "chunk of rock".

Sorry if this is an obvious question; I looked in the Inform 7 manual and couldn’t find anything: is there documentation for command-line compilation with Inform 7?

No, you have to scope it out yourself.

Look at the Results/Console tab after a successful compile. It’s pretty obvious.

Here’s the code for Linux. It may be slightly different for other OSes (and of course the paths will be different.)

/usr/local/libexec/ni --internal /usr/local/share/inform7/data --noprogress --format=ulx --project Kerkerkruip.inform /usr/local/libexec/inform6 -E2wSDG Kerkerkruip.inform/Build/auto.inf -o Kerkerkruip.inform/Build/output.ulx /usr/local/libexec/cBlorb -unix Kerkerkruip.inform/Release.blurb Kerkerkruip.inform/Build/output.gblorb

To say i: say "[italic type]". To say b: say "[bold type]". to say f: say "[fixed letter spacing]". to say v: say "[variable letter spacing]". to say p: say "[paragraph break]". to say l: say "[line break]". to say /: say "[roman type]".

The “to say” only works within quotation marks though.

With this I can write

say "'Don't shout at me in [i]italics[/],' she hollered back."

I seem to remember doing something similar, but gave it up due to inconsistent paragraph break issues.

You should define those style tags like this:

To say b – running on: (- style bold; -).
To say i – running on: (- style underline; -).
To say / – running on: (- style roman; -).

This is exactly how the originals appear in the Standard Rules (except for the “documented as…” tag, which you don’t want) so they behave exactly the same.

Thanks for all the replies.

To say b – running on: (- style bold; -).
To say i – running on: (- style underline; -).
To say / – running on: (- style roman; -).

I have this sort of thing already which made me wonder whether other abbreviations might be possible.

I use several little abbreviations like that, which I keep in this extension.