-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Conversation
Edited the section of 《Indentation Options》。 Add some detailed usages and examples.
There was a problem hiding this 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`: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here presumably
Continued in #50. |
Edited the section of 《Indentation Options》。
Add some detailed usages and examples.