Hello, I don't understand how to use Nimpretty. if I look the help, I got these 
(didn't find any doc online ) :
    
    
    nimpretty -h
    nimpretty - Nim Pretty Printer Version 0.2
      (c) 2017 Andreas Rumpf
    Usage:
      nimpretty [options] file.nim
    Options:
      --out:file            set the output file (default: overwrite the input 
file)
      --indent:N[=0]        set the number of spaces that is used for 
indentation
                            --indent:0 means autodetection (default behaviour)
      --maxLineLen:N        set the desired maximum line length (default: 80)
      --version             show the version
      --help                show this help
    
    
    Run

so, I thought that it would simply save my file corrected with this simple 
command : 
    
    
    nimpretty tst1.nim
    
    
    Run

but it doesn't save it, even if I try to use the "out" option (with or without 
a name)..

now, with a simple test file like that : 
    
    
    var
      tmp1: string
      tmp2: string
    
    
    Run

if I put 3 spaces for indentation on the "tmp1" line (and 2 on "tmp2" line), I 
got this : 
    
    
    nimpretty tst1.nim
    C:\Data\nim\tst_time\tst1.nim(3, 3) Error: invalid indentation
    
    
    Run

and this if I invert (2 spaces before tmp1 & 3 before tmp2) : 
    
    
    nimpretty tst1.nim
    C:\Data\nim\tst_time\tst1.nim(3, 4) Error: invalid indentation
    
    
    Run

and still got exactly the same results if I change the command line for : 
    
    
    nimpretty --indent:2 tst1.nim
    
    
    Run

so, why is the error always reported on line 3, even when adding "\--indent:2" 
???

is Nimpretty still useful and how should I use it ? thanks..

Reply via email to