How do I bookmark code I use that is too tricky to remember?

–1 vote
51 views
asked Mar 23 in Authoring by AndrewS (250 points)
recategorized Mar 27 by Alex
I need that memory space for my writing! I'd rather have favorite text to cut and paste.
commented Mar 24 by Alex (486 points)
A bit of an unclear question, and presumably specific to Inform?

1 Answer

0 votes
answered Mar 23 by AndrewS (250 points)
I generally use comments, especially for something I forgot twice.

 

[forgot] is useful code to remember something, as is, even more succinctly, [!]. You can also put [! (description)] to remember what it's for.

 

You may need recursive text search on all the story.ni files to find this, but it can help a lot for precise syntax.

 

The sort of thing I often forget is

definition: a person (called x) is y-ish:

to decide what number is palace-let:
to decide whether below-is-wrong:

to decide whether you-can-advance:

to decide which person is the suspect:

to decide which direction is the psgdir of (gu - a guardian):
commented Mar 24 by anonymous
I usually put TODO into a comment , e.g. [TODO: blah blah remember this later blah blah.] as it's easy to then search/grep the source code for TODO to find them all.  The same couls be applied to blocks of reusable syntax.

This might also be of use:  https://inform7.uservoice.com/forums/57320-general/suggestions/751562--ide-add-bookmarks-in-the-source-text
commented Mar 24 by AndrewS (250 points)
Oh, that'd be a neat feature if it got implemented. It seems kind of tricky, though.

TODO is really handy. I suppose any text that doesn't pop up in a word works well for a quick search, so you don't even need the bracket unless your game has lots of mastodons.
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...