`dump` macro in `sugar` module is different from your `jecho`, but easy to 
print expressions.
    
    
    import std/sugar
    
    var
      x = "Hello"
      y = 100
      z = 42.0
    
    #dump x, y, z # Compile error
    dump (x, y, z)
    dump x & $y
    dump z
    
    Run

Output:
    
    
    (x, y, z) = ("Hello", 100, 42.0)
    x & $y = Hello100
    z = 42.0
    
    Run

If you are using Vim/Neovim, it can automatically insert 2 spaces when you 
press a tab key by setting following options:
    
    
    set expandtab
    set tabstop=2
    set shiftwidth=2
    
    Run

Also you can decrease/increase indent with '<'/'>' key in normal mode. If you 
are not using Vim/Neovim and you think your editor is better than Vim, it 
should have features that can indent your code without pressing space key so 
hard.

Reply via email to