-
Notifications
You must be signed in to change notification settings - Fork 0
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
PyCharm & python code regions: # Region
does not work
#56
Comments
# Region
does not work# Region
does not work
# Region
does not work# Region
does not work
# Region
does not work# Region
does not work
@schittli So if you will add in Better Highlights region tokens in lowercase, then you can achieve desired functionality? As for proposals:
|
Hello @clutcher
Yes, if I use source code region tokens in lowercase, then PyCharm recognizes the regions and allows to fold them (but Better Highlights does not highlight the regions) If I use source code region tokens in uppercase, then PyCharm does not recognizes the regions (but Better Highlights highlights them) I had not seen that we can define the Better Highlights tokens in the settings. So I just tested it now and changed the tokens to ℹ️ If you want to solve the case-sensitive problem in general, ...then custom regex would really help, because users work with different file types (html, css, python, etc.) and with a custom Regex they cold configure an expression which works with all their file types 😃 Thanks a lot, kind regards, |
@schittli Region works same in free and paid version. I'll take a look why it doesn't work with lower case region and end keyword. |
@schittli Just checked and do not see any issues: |
@schittli Can you recheck and confirm if you can use that approach untill I'll put more robust settings? |
Good afternoon
I have found another, probably small issue in PyCharm for Python source files:
If a Region is declared with upper case char (
# Region Init-Section … # Endregion Init-Section
), then:✔️ Better Highlights recognizes the region
❌ PyCharm does not recognize the region and, therefore, does not allow to fold it 😢
If a Region is declared with lower case char (
# region Init-Section … # endregion Init-Section
), then:️❌ Better Highlights does not recognize the region
✔️ PyCharm perfectly recognize the region and allows to fold it 😃
I propose that:
a) Users can configure if Better Highlights recognizes Region declarations case sensitive / insensitive
b) That Better Highlights always recognizes Region declarations case insensitive
b) or: that Users can define regular expressions to recognize start and end of regions
Thanks a lot, kind regards,
Thomas
The text was updated successfully, but these errors were encountered: