Skip to content

Instantly share code, notes, and snippets.

@baweaver
Created December 20, 2019 22:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baweaver/3bbdce5f38cffd344d1e1919a2856c1f to your computer and use it in GitHub Desktop.
Save baweaver/3bbdce5f38cffd344d1e1919a2856c1f to your computer and use it in GitHub Desktop.
# Bad - Hard to read
some.really.long.chain_of_things(:with,
:arguments,
:that,
:are,
:out_here,
:is_unreadable,
:at_a_glance)
# Good - Eye doesn't flow far right then
# hard back left for new lines
some.really.long.chain_of_things(
:with,
:arguments,
:that,
:are,
:here,
:are_much_easier_to_read,
:at_a_glance
)
@aditya-kapoor
Copy link

Better?

some.really
    .long
    .chain_of_things(
      :with,
      :arguments,
      :that,
      :are,
      :out_here,
      :is_unreadable,
      :at_a_glance
    )

@igbanam
Copy link

igbanam commented Jan 5, 2020

I hereby dub this "Waterfall Indentation" 😤

@kylekeesling
Copy link

Curious about your thoughts on using the \

some.really.long.chain_of_things \
  :with,
  :arguments,
  :that,
  :are,
  :out_here,
  :is_unreadable,
  :at_a_glance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment