editor_visible_tabs = 0
if you use internal mc editor, your new setting will be on exit overvritten back to default
editor_visible_tabs = 1
then use this one line script (from http://linuxforum.ru/index.php?showtopic=36491):
export S="editor_visible_tabs="; if grep -q ${S}1 .mc/ini; then sed -i s/${S}1/${S}0/ .mc/ini; A=off; else sed -i s/${S}0/${S}1/ .mc/ini; A=on; fi; echo visible tabs $A