https://github.com/DaveJarvis/keenwrite#features
What sets KeenWrite apart is the ability to use (externally-defined) variables within the prose, shown in this older demo video:
https://www.youtube.com/watch?v=u_dFd6UhdV8
Also, variables work in diagrams, R expressions, and TeX equations. For example, take a look at the following screenshot:
https://raw.githubusercontent.com/DaveJarvis/keenwrite/maste...
The palette is defined in one spot, allowing colours to be used by both diagrams and typesetting the final PDF. Further, character names can be assigned and referenced within both the prose and diagrams. Also, the variables are interpolated, which allows variables to be defined in terms of other variables.
Are there any other text editors that have interpolated variable references? (I looked, but didn't find any, so started developing my own text editor.)