#910 Don't show single spaces between words

open
Scintilla (356)
3
2014-07-10
2012-02-25
HyperHacker
No

The Show Whitespace function is useful, but it can be somewhat disorienting and distracting seeing small·dots·between·every·word, especially in strings. I'd love to see an option to not show single spaces except at the beginning/end of a line.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2012-02-25

    The main reason for 'Show Whitespace' is to investigate problems with whitespace by making it visible. Its not really meant to be left on.

     
  • Neil Hodgson

    Neil Hodgson - 2012-02-25
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 3
     
  • Peter Scholtens

    Peter Scholtens - 2014-07-09

    If I combine the original and my own request (setting the visibility of the tabs and space individually, see https://sourceforge.net/p/geany/feature-requests/728/ ) the total list of usefull possibilities will be (as defined in ViewStyle.h):

    enum WhiteSpaceVisibility {
        wsInvisible=0,            // Don't show anything
        wsVisibleTab=1,           // Handy for finding tabs in a makefile.
        wsVisibleMultiSpace=2,    // Show only multiple space (avoid dots inside the strings)
        wsVisibleAllSpaces=3,     // Show all spaces, but no tabs.
        wsVisibleTabMultiSpace=4, // Show tabs and all multiple spaces.
        wsVisibleEverything=5     // Show tabs and spaces (including single spaces).
    };
    

    By the way, am I right to observe that wsVisibleAfterIndent=2 is not used at all?

     
  • Neil Hodgson

    Neil Hodgson - 2014-07-10

    The wsVisibleAfterIndent value works but in the code the tests refer to the other values leaving wsVisibleAfterIndent as the else/default case.

    This change doesn't include any 'after indent' functionality so is incompatible with existing applications.

    That modified enumeration contains 2 sub-states for tabs and spaces which should be treated separately to make it easier to set and use the combinations. [NoTab=0, Tab=1], and [NoSpace=0, MultiSpace=1, AllSpace=2]. These can be encoded into bit masks. So tab gets 1 bit and spaces get 2 bits to encode 3 states: wsVisibleTab=1, wsVisibleMultiSpace=2, wsVisibleAllSpace=4.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks