To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorAlign Assignment
- Background
-
- When
- I open a new edit tab
- Scenarios
-
- align simple assignments
- align rows that have empty lines
- preserve trailing newline
- preserve non-selected indentation
- align the right hand side of the operator
- aligning different length operators
- aligning hashes
- align simple assignments
-
- When
- I replace the contents with "a = 4\nbc = 5\nd = 123"
- And
- I select all
- And
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
- the contents should be "<c>a = 4\nbc = 5\nd = 123<s>"
- align rows that have empty lines
-
- When
- I replace the contents with "a = 1\n\nab = 123"
- And
- I select all
- And
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
- the contents should be "<c>a = 1\n\nab = 123<s>"
- preserve trailing newline
-
- Given
-
the content is:
def foo <c> a = 1 bb = 2 ccc = 3 <s>end
- When
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
-
the content should be:
def foo <c> a = 1 bb = 2 ccc = 3<s> end
- preserve non-selected indentation
-
- Given
-
the content is:
def foo <c>a = 1 bb = 2 ccc = 3<s> end
- When
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
-
the content should be:
def foo <c> a = 1 bb = 2 ccc = 3<s> end
- align the right hand side of the operator
-
- Given
-
the content is:
def foo <c> a = 1 bb = 2 ccc = 3<s> end
- When
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
-
the content should be:
def foo <c> a = 1 bb = 2 ccc = 3<s> end
- aligning different length operators
-
- Given
-
the content is:
Integer === 1 two =~ /2/ @three||= 3333 bits &= 0b101010
- And
- I select all
- When
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
-
the content should be:
<c>Integer === 1 two =~ /2/ @three ||= 3333 bits & = 0b101010<s>
- aligning hashes
-
- Given
-
the content is:
{:one => 1, :two => 22, :threee => 333}
- And
- I select all
- When
- I run the command Redcar::EditView::AlignAssignmentCommand
- Then
-
the content should be:
<c>{:one => 1, :two => 22, :threee => 333}<s>
Last published over 5 years ago by danlucraft.