Open pokey opened 2 years ago
As usual, great questions 😄
- What about if the next line has no indentation should our remove command actually add white space?
Yes, it should replace all whitespace (including newlines, indentation, etc) from from end of line to start of content on next line with a single space character
- What about if you have a line with indentation and say chuck leading? should we then remove the leading white spaces and thereby mess up the indentation?
Why would it mess up indentation? I'd argue for the following:
If you have:
hello world
whatever
Saying, "chuck leading line"
on the second line should leave you with
hello world whatever
Ie it replaces all leading indentation and newline with a single space
However, if the preceding line is empty, it should not touch indentation on targeted line
- How do we handle highlights in all of the above scenarios?
I think if next / prev line is empty, hit it with full line highlight. Otherwise highlight newline and indentation that was removed with red before replacing it with space
Should leave exactly one space if the next line has content. Eg
Today,
"chuck trailing line"
on the first line leaves you withBut we'd prefer
If the next line is empty, it just deletes it
Could implement this by having
getTrailingDelimiterTarget
for line return a target that creates a custom removal edit