in this tutorial we will work with sublime 3 and macros. A macro works almost like a function. We use them like functions and we can use arguments to pass variables to alter or individualize several parameters inside a  macro.

But instead of returning any values or executing any code, a macro is “printing” the whole code from inside it, whenever and wherever it gets called.

So we can use macros like factories to even create other functions, callbacks or any other code fragments. Preferably whenever we have repetitive code patterns so that we don’t have to write them again and again. Read more »


You get Sublime 3 from https://www.sublimetext.com/3

Note: you can use it without any restrictions but you still need to buy a license. It’s really worth it!

Thx to Nils Liberg and nojanath who created a KSP plugin for Sublime Text with many new possibilities like macros, for statements, functions and many more, using Sublime is almost essential when it comes to complex scripts since it simplifies things a lot (like structuring our code and saving lots of code-lines). It also helps us to better reveal some errors. There are also new practices & features, like a different (easier) coding with less required code. Read more »