-
Notifications
You must be signed in to change notification settings - Fork 114
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
Auto indent feature add #562
Conversation
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 the PR! I think this makes for a nice new feature!
@@ -53,6 +53,7 @@ class Config(dict): | |||
"leftDividerPosition": 260, | |||
"rightDividerPosition": None, | |||
"cloudMaxTags": 1000, | |||
"autoindent": 1, |
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.
Can you use "autoIndent" here and auto_indent in the rest of the code, please?
if self.journal.config.read("autoindent") == 1: | ||
self.day_text_field.day_text_view.set_auto_indent(True) | ||
else: | ||
self.day_text_field.day_text_view.set_auto_indent(False) |
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.
Let's shorten this a bit:
def set_auto_indent(self):
auto_indent = self.journal.config.read("autoindent") == 1
self.day_text_field.day_text_view.set_auto_indent(auto_indent)
@@ -1,6 +1,7 @@ | |||
# Unreleased | |||
* Add a "Give Feedback" button (#551, Rahul Jha). | |||
* Test code on macOS (#552, Rahul Jha). | |||
* added feature to auto-indent text in editor (#561, Allen Benter) |
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.
Add option to auto-indent text (#561, Allen Benter).
This feature has been requested also in issue #561. It would be cool if we could merge this PR. Do you have the time to make the changes I suggested? |
Hi Jendrik,
I'm no longer using RedNotebook so won't be able to complete the PR.
Thank you for all your time and effort in developing the app.
Cheers,
…--
Dr Allen Benter
Technical Specialist Digital Agriculture
Climate | DPI Agriculture
Department of Regional NSW
M 0418 716 688
E ***@***.******@***.***>
W dpi.nsw.gov.au/dpi/climate<https://www.dpi.nsw.gov.au/dpi/climate>
Orange Agriculture Institute
1447 Forest Road, Orange 2800
[cid:bda6e39e-187b-467b-b397-4fb042af7680]<https://www.regional.nsw.gov.au/>
Department of Primary Industries
Department of Regional NSW
________________________________
From: Jendrik Seipp ***@***.***>
Sent: Thursday, 29 December 2022 9:13 AM
To: jendrikseipp/rednotebook ***@***.***>
Cc: Allen Benter ***@***.***>; Author ***@***.***>
Subject: Re: [jendrikseipp/rednotebook] Auto indent feature add (#562)
This feature has been requested also in issue #561<#561>. It would be cool if we could merge this PR. Do you have the time to make the changes I suggested?
—
Reply to this email directly, view it on GitHub<#562 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGNKXL3E2IW2T6YIPDVM2OLWPS3SLANCNFSM4Y2XUNUA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This was added in version 2.35, based on the changes here. |
Summary of the changes in this pull request
Added feature to enable auto indent in editor.
Pull request checklist
CHANGELOG.md
including my name and issue and/or pull request number.TODO.md
.