On another topic, @Niki_Christopherson asked what I meant by:
and I’ve personally found Notepad++ macros such an invaluable time-saver that I thought I’d give the answer its own topic. Please note that I’m writing this as an amateur tinkerer, for the sake of my fellow amateur tinkerers – I’m sure that people familiar with actual best practice in coding can usefully correct/expand on what I say here.
So: If you’re using Notepad++ for your coding, you can go to the “Macro” menu and click “Start Recording.” Then (in whatever .txt file you have open) type some bit of code you use often, like
${they}
for example, if that’s the pronoun you’re using for a gender-variable MC or NPC. Click “Stop Recording” when you’ve typed that bit of code, and then “Save Current Recorded Macro.” That will give you a chance to choose a key combo for the macro, like ALT and T. From that point on, instead of typing out ${they}
you can just hit ALT T.
This can offer a big improvement in typing speed, especially for those of us who don’t regularly type curly brackets or pipes for a living. It makes it quicker to type out related snippets like ${them}
, ${their}
, and ${theirs}
too. At least, I find it quicker to hit ALT T, delete the “y” and type “m,” than to type out ${them}
from scratch.
Sidebar: My own ALT T macro is actually set to:
${they} verb${s}
which helps me make sure any verb coming off of a singular-they will conjugate correctly–I hit ALT T, then highlight “verb” and replace it with the actual word I want, e.g. “run.” So for my enby character Jev, who can have “o” or “they” as their pronouns (and has the variable s
set to “s” or “” respectively), ${they} run${s}
will show either “o runs” or “they run”. If I just want ${they}
, ${them}
, etc. it only takes two clicks to delete the verb${s}
after I hit ALT T.
For multireplace, you could record a macro of
@{ |}
or
@{var a|b}
if you want to have placeholder text that’s easy to double-click and replace with your actual variable and flavor text options. In this case, my own macro is actually set to a specific, very common multireplace from my WIP: I hit ALT G and get @{gam ${gamgee}|Yed}
, and just replace the terms as needed.
Other examples: I’ve got macros that spit out ${fname}
and ${lname}
(the MC’s first and last names), which come up a lot. But instead of going on to create macros for all the less common “name” permutation variables – like ${sfname}
, the way the character S addresses you (maybe by your first name, maybe by a combo of name and title, maybe just by your title, depending on the level of trust in your relationship), or ${sojname}
, the alias the MC is known by in the city of Sojourn – I can just use the ALT F macro for ${fname}
and add or replace a letter or two. The core typing speed benefit (not having to hunt-and-peck for $
and { }
) is baked into the macro.
Of course macros can also save typing time if you’ve got medium-to-long variable names. For example, because the terminology for magic can vary in my gameworld, I’ve got three related variables: ${wisard}
, ${wisardry}
, and ${wisardric}
. Life’s too short to be typing them out all the time, so ALT W gives me the most commonly used one, ${wisardry}
, which I can then quickly edit to either of the other two if needed.
Anyway. Recordable macros are the main reason that I still type the first draft of the game in Notepad++, even though I review, test, and edit my work in CSIDE. I suspect they might fall into the category of something that most non-coders are unfamiliar with, while most coders take them so much for granted that they don’t talk about them. Hopefully this thread will connect with a few more non-coders who will find them as useful as I have.