[bug #13146] make tabs and trailing spaces visible

Oswald Buddenhagen savannah-bounces at gnu.org
Sat May 21 19:25:17 UTC 2005


URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13146>

                 Summary: make tabs and trailing spaces visible
                 Project: GNU Midnight Commander
            Submitted by: ossi
            Submitted on: Sat 05/21/2005 at 19:25
                Category: Editor
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
                 Release: current (CVS or snapshot)
        Platform Version: All

    _______________________________________________________

Details:

visible tabs help putting the tabs where you want them, particularly when
trying to stay consistent with the style of text written by somebody else.
making trailing whitespace visible helps avoiding it in undesired places.

here is a patch that accomplishes this. it is missing an option to disable
this feature, so i post this as a wish instead of as a patch.

i wanted the visibility to be as subtle as possible. therefore just changing
the background color (see leading tabs in Makefile highlite) was no option.
so i paint tabs as excerpts of <------> and spaces as dots. to make it really
subtle, i paint it bright blue on dark blue (the regular background) - this is
hardly visible, unless you are looking for it. i know of no way to make it
equally subtle on monochrome displays,
so the feature is disabled alltogether there.
the whitespace becomes invisible when the text is selected, as there is no
possibility to merge colors. it'd be nice to fix this generally.
the highlite color is not defined by syntax highlighting, but by an extra
palette entry. i think this makes sense.
this feature overrides other colors that might be defined for whitespace,
like the red background of tabs in Makefiles. the block in #if 0 would
preserve the color of already highlighted whitespace, but it's a too broad
criterion. i don't think ignoring this fact is a problem, as you can
recognize the tabs anyway (obviously).
note, that you can't just copy such text from the terminal, as the
pseudo-whitespace chars will show up in the copy. therefore a hotkey to
switch it off quickly would be useful. otoh, a) the problem that this feature
is disabled in selected blocks is an advantage in this context and b) by
copying, you would be destroying the original whitespace anyway.






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 05/21/2005 at 19:25  Name: mcedit-visible-ws.diff  Size: 4.38KB  
By: ossi
the not-so-ready patch
<http://savannah.gnu.org/bugs/download.php?item_id=13146&item_file_id=2526>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13146>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




More information about the mc-devel mailing list