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

Edited Indentation Options #49

Closed
wants to merge 1 commit into from
Closed

Edited Indentation Options #49

wants to merge 1 commit into from

Conversation

ChengAnXu2014
Copy link

Edited the section of 《Indentation Options》。
Add some detailed usages and examples.

Edited the section of 《Indentation Options》。
Add some detailed usages and examples.
Copy link
Contributor

@keith-hall keith-hall left a comment

Choose a reason for hiding this comment

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

Thanks for this - having examples definitely makes it clearer.

<string><![CDATA[^\s*bracket$]]></string>
```

Then in `view`:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not convinced "view" needs to be backtick-quoted here. It might be better to say something like "Then, in a buffer for which this tmPreferences file is active", though I agree that is a bit of a verbose mouthful.

```

`disableIndentNextLinePattern`
: *Regex.*
If it matches on the current line,
the next line will not be indented further.
Deprecated in ST3, use unIndentedLinePattern instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not deprecated as far as I understand, unIndentedLinePattern means the line doesn't affect the indentation calculation of other lines, but disableIndentNextLinePattern specifically disables just the bracketIndentNextLinePattern indentation. This is so that an if statement for example without a curly brace will indent the next line, but that indentation will be cancelled when typing {.

<key>unIndentedLinePattern</key>
<string>insert regex here</string>
<string><![CDATA[^\s*unindented$]]></string>
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess for the examples below to work, the $ anchor would have to be removed?

<key>decreaseIndentPattern</key>
<string><![CDATA[^\s*[A-z]+]]></string>
<key>unIndentedLinePattern</key>
<string><![CDATA[^\s*unindented$]]></string>
Copy link
Contributor

Choose a reason for hiding this comment

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

same here presumably

@FichteFoll FichteFoll mentioned this pull request May 22, 2021
@FichteFoll
Copy link
Member

Continued in #50.

@FichteFoll FichteFoll closed this May 22, 2021
@FichteFoll FichteFoll added the duplicate This issue or pull request already exists label May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants