You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleBobdoimportStringdefhey(input)doconddo""==trim(input)->"Fine. Be that way!"ends_with?(input,"?")->"Sure."input==upcase(input)&&input!=downcase(input)->"Whoa, chill out!"true->"Whatever."endendend
defmoduleBobdoimportStringdefhey(input)doconddo""==trim(input)->"Fine. Be that way!"ends_with?(input,"?")->"Sure."input==upcase(input)&&input!=downcase(input)->"Whoa, chill out!"true->"Whatever."endendend
This happens when the arrow -> is at the end of the line. If the statement is in the same line then the code formatting works fine.
defmoduleBobdoimportStringdefhey(input)doconddo""==trim(input)->"Fine. Be that way!"ends_with?(input,"?")->"Sure."input==upcase(input)&&input!=downcase(input)->"Whoa, chill out!"true->"Whatever."endendend
And here is an example what happens with a longer file.
I did some minor change to Indent.tmPreferences which breaks indentation under conditionals and function definitions for the lines that end with arrow. But at least it is better than before. My regexp skills are very primitive and I haven't touched a sublime plugin before.
defmoduleBobdoimportStringdefhey(input)doconddo""==trim(input)->"Fine. Be that way!"ends_with?(input,"?")->"Sure."input==upcase(input)&&input!=downcase(input)->"Whoa, chill out!"true->"Whatever."endcasetruedotrue->test{:something.:else}->{:it,:works}{test}true->endendend
I have this .exs file
And in my keybindings I have
But when I reident the file I get
This happens when the arrow
->
is at the end of the line. If the statement is in the same line then the code formatting works fine.And here is an example what happens with a longer file.
The text was updated successfully, but these errors were encountered: