julia-vim icon indicating copy to clipboard operation
julia-vim copied to clipboard

Feature request: indent the line following `=` (rhs of `=` in newline)

Open ngphuoc opened this issue 8 years ago • 1 comments

It would be helpful to have an option to allow this type of indentation. For example:

a_quite_long_function_definition(with, a, number, of, variables) = 
<indent>condition_1 ? value_1 :
<indent>condition_2 ? value_2 :
<indent>condition_3 ? value_3 :
...
                      value_n

ngphuoc avatar Jan 28 '18 02:01 ngphuoc

Except from the alignment in :, at least the indentation after = would be nice. This will turn:

teste(a) =
if a == 1
    return 1
else
    return 2
end

into

teste(a) =
    if a == 1
        return 1
    else
        return 2
    end

I think Julia-emacs does this.

ronisbr avatar Apr 13 '21 16:04 ronisbr