Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update metadata.md #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChengAnXu2014
Copy link

Edited 《Indentation Options》section.

Edited 《Indentation Options》section.
```

`disableIndentNextLinePattern`
: *Regex.*
If it matches on the current line,
the next line will not be indented further.
and `bracketIndentNextLinePattern`'s *Regex* also matches on the current line.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't bracketIndentNextLinePattern have matched on the previous line?
https://forum.sublimetext.com/t/everything-you-n-ever-wanted-to-know-about-indentation-in-st3/26207?u=kingkeith

```

`unIndentedLinePattern`
: *Regex.*
If it matches on the current line,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think the current wording we have is clearer. It doesn't check if the other regex patterns match, its irrelevant.

@keith-hall
Copy link
Contributor

It would be easier to review if you just pushed new commits to the same branch to update the existing PR, rather than create a new branch and PR each time, as this way all the previous comments are still visible in one place.

This was referenced May 22, 2021
Copy link
Member

@FichteFoll FichteFoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please push commits to the existing branch instead of opening new pull requests, as @keith-hall mentioned. I have closed the previous two PRs.

I also strongly suggest to reply to review comments on the website and not via email, als that will group them all together and thus doesn't make use of the context separation of individual review comments.


```xml
<key>bracketIndentNextLinePattern</key>
<string><![CDATA[^\s*[A-z]]]></string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex is basically equivalent to \S for all the examples following, so we might as well simplify it to that as to not make it more complex that it needs to be. It will basically match on every non-blank line.

```xml
lineone only match increaseIndentPattern Regex effects made
after lineone1
after lineone2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have to test this locally, but I would have expect this line to be indented further.

In general, I feel like the "examples" are a bit hard to understand because there are no steps for reproduction, i.e. the user cannot really use a mental model to apply the same rules as ST does for the indentation settings. Or at least I have a problem with it.

I believe it will be easier to understand if the examples showed the result of a reindent command having run on the entire example text, similar to how indentation tests function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants