From c4ea5cb1a3811cbf685a1542a69b33ba3d6345f1 Mon Sep 17 00:00:00 2001 From: Matheus Santos Date: Sat, 13 Nov 2021 13:49:09 +1100 Subject: Text Editor: Auto close relevant characters Support the ability to close relevant characters like '(', '[' and '{'. It will also delete the pair character if they're empty. Ref D13119 Reviewed By: campbellbarton --- release/scripts/startup/bl_ui/space_userpref.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index abd235f1c44..8c15e10d4ff 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -477,6 +477,16 @@ class USERPREF_PT_edit_weight_paint(EditingPanel, CenterAlignMixIn, Panel): col.active = view.use_weight_color_range col.template_color_ramp(view, "weight_color_range", expand=True) +class USERPREF_PT_edit_text_editor(EditingPanel, CenterAlignMixIn, Panel): + bl_label = "Text Editor" + bl_options = {'DEFAULT_CLOSED'} + + def draw_centered(self, context, layout): + prefs = context.preferences + edit = prefs.edit + + layout.prop(edit, "use_text_edit_auto_close") + class USERPREF_PT_edit_misc(EditingPanel, CenterAlignMixIn, Panel): bl_label = "Miscellaneous" @@ -2357,6 +2367,7 @@ classes = ( USERPREF_PT_edit_annotations, USERPREF_PT_edit_weight_paint, USERPREF_PT_edit_gpencil, + USERPREF_PT_edit_text_editor, USERPREF_PT_edit_misc, USERPREF_PT_animation_timeline, -- cgit v1.2.3