Terry J. Reedy added the comment: I agree that this is an issue, and I believe others have made similar comments or requests, but I cannot find an existing issue for this.
By experiment, it is possible to tag a tab and change the background color for the spaces a tab is visually converted to. import tkinter as tk root = tk.Tk() text = tk.Text(root) text.pack() text.insert('insert', 'a\tb') text.tag_add('TAB', 1.1, 1.2) text.tag_config('TAB', background='#ffd') # light yellow, or text.tag_config('TAB', background='#eee') # light gray http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/text-methods.html The other tag configuration options that refer to text, such as overstrike and underline, have no visual effect. Neither does non-zero borderwidth. I am reluctant to add visible characters. The need to delete them would complicate converting tabs to spaces and saving files. Since Idle normally converts tabs to spaces on input, they are not common in edited files. The main issue, as you mention, is code imported from elsewhere. Some issue remain. 1. Tagging tabs: I presume this is no problem, but will not know until there is a patch. 2. The priority of the TAB tag relative to others. The importance of this depends on the next question. 3. Should tab space in comments and strings be shaded? I think so. If so, should the shading match the comment/string foreground color? ---------- nosy: +terry.reedy stage: -> test needed title: Highlite tabs in the IDLE -> Idle: highlite tabs versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22354> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com