How to set up the flow for a particular board/etc/

I usually write for an Arduino Uno.

Now and then I write sketches for the NodeMCU.

Is there a way I can put something in the sketches so when I load the one for the UNO, it sets up to program the UNO.

But when I load a sketch for the NodeMCU it sets up for the Node.MCU?

The Arduino Web Editor does have this functionality. The standard Arduino IDE does not, though it has been requested often.

There are some kind of hacky workarounds that could provide this functionality with the standard Arduino IDE in a somewhat inconvenient manner. If you're interested, let me know and I'll give instructions.

Thanks, but I'd better not push my luck.

I'll just have to remember to change it if/when I change type of board I am using.