Menu

#948 strip.trailing.spaces should be filetype-dependant

Completed
closed
SciTE (278)
3
2012-08-31
2012-08-11
No

Currently, strip.trailing.spaces can only be set globally. However, some file types and/or their corresponding lexers are sensitive to spaces even in empty lines. For example, strip,trailing.spaces=1 breaks the YAML lexer's formatting of multi-line values. It is also makes it impossible to have "filler" spaces in YAML multi-line values. On the other hand, strip,trailing.spaces=1 is a good setting in most coding contexts.

Therefore, it would make very much sense to be able to set a default value "globally":

strip.traling.spaces=1

and override it for specific file types:

strip.traling.spaces.$(file.patterns.yaml)=0

Discussion

  • Neil Hodgson

    Neil Hodgson - 2012-08-12

    I'll accept a well-written patch that includes documentation changes but will not be working on this myself.

     
  • Neil Hodgson

    Neil Hodgson - 2012-08-12
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 3
    • milestone: 100662 -->
    • labels: 101018 --> SciTE
     
  • Jérôme LAFORGE

    Hello,
    I don't write the documentation yet, because I want to know before whether this patch is well-written enough.
    http://pastebin.com/HH4eTTrR
    BR
    Jérôme LAFORGE

     
  • Jérôme LAFORGE

    Plz find this new patch where the buffers are managed :
    http://pastebin.com/bv7QUuwJ

    As I told you before, the documentation is not wrote yet because I want to know whether this patch is well written enough.

     
  • Jérôme LAFORGE

    Plz find another patch where I try to limit modifications into SciTEBase::PrepareBufferForSave. I have also to modify MatchWild method to add it into PropSetFile (to access it easily).

    This patch manages file pattern and not only.
    http://pastebin.com/jfbCmVez

    I stop work on this patch (documentation) until Neil gives me feedback to know whether this patch is well-written enough and if necessary what need to be improved.

     
  • Neil Hodgson

    Neil Hodgson - 2012-08-22

    Making a property file-type-sensitive should be close to a 1-line change and should not modify PropSetFile. See, for example, use.tabs although that code could be tighter.

     
  • Jérôme LAFORGE

    Ok thx for the tip:
    Plz find this new patch with doc :
    http://pastebin.com/9NYWrwC9

     
  • Neil Hodgson

    Neil Hodgson - 2012-08-23

    Committed.

     
  • Neil Hodgson

    Neil Hodgson - 2012-08-23
    • milestone: --> Completed
     
  • Neil Hodgson

    Neil Hodgson - 2012-08-31
    • status: open --> closed
     

Log in to post a comment.