This is very possible, although you of course need a plugin. As an example, here's a quick plugin that does what you want for MV; a glance at the MZ source code suggests it should work equally well there. Just create a file called NamedVariables.js (or whatever else you want to call it) in the plugins folder and paste the code in there.
JavaScript:
(function() {
const old_convert = Window_Base.prototype.convertEscapeCharacters
Window_Base.prototype.convertEscapeCharacters = function(text) {
text = text.replace(/\\/g, '\x1b');
for(let i = 0; i < 2; i++) {
text = text.replace(/\x1bV\[([a-zA-Z_-][a-zA-Z0-9_-]*)\]/gi, function()
let varId = $dataSystem.variables.indexOf(arguments[1]);
if(varId <= 0) return '';
return $gameVariables.value(varId);
});
}
text = old_convert.call(this, text);
return text
}
})()
Pay special attention to this part:
[a-zA-Z0-9_-]
That means it will only work for variable names that contain letters (a-zA-Z), numbers (0-9), underscores, and hyphens. If you use other characters in your variable names, you can add them there. Just make sure the hyphen is last if present.
For example, if you add space and dollar sign it might become:
[a-zA-Z0-9_$ -]
Also note: this code
does need to appear twice with the first case excluding 0-9. Otherwise, using variables by number will stop working.