Still think it should be one simple "stay out of my code" checkbox wherever you can type anything, to make it take and accept the input as plain text and not butt in, likely with "but still add [ ] line breaks [ ] paragraph breaks" below it if checked. And maybe a separate "do not replace characters" checkbox too, if you want everything exactly as typed, no "nice" quotes, apostrophes, dashes and so on, symbols not replaced with codes, that sort of thing.

And if switching between checking and unchecking, so between visual and plain, it would switch the view accordingly, revealing code if box is checked, showing how it'd look if the box is unchecked. No different widgets, tabs, whatever, just something to click right under the editing area, wherever it is, simple and consistent.