mirror of
https://github.com/godotengine/godot.git
synced 2025-01-19 08:22:01 +00:00
Added setting to toggle auto indent
This commit is contained in:
parent
4722593448
commit
d586b98a20
@ -1079,6 +1079,7 @@ void CodeTextEditor::update_editor_settings() {
|
||||
text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
|
||||
text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/indent/type"));
|
||||
text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
|
||||
text_editor->set_auto_indent(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent"));
|
||||
text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
|
||||
text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
|
||||
text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_numbers_zero_padded"));
|
||||
|
@ -616,6 +616,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
hints["text_editor/indent/type"] = PropertyInfo(Variant::INT, "text_editor/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces");
|
||||
set("text_editor/indent/size", 4);
|
||||
hints["text_editor/indent/size"] = PropertyInfo(Variant::INT, "text_editor/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes.
|
||||
set("text_editor/indent/auto_indent", true);
|
||||
set("text_editor/indent/convert_indent_on_save", false);
|
||||
set("text_editor/indent/draw_tabs", true);
|
||||
|
||||
|
@ -280,6 +280,7 @@ void ShaderEditor::_editor_settings_changed() {
|
||||
shader_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
|
||||
shader_editor->get_text_edit()->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
|
||||
shader_editor->get_text_edit()->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/indent/type"));
|
||||
shader_editor->get_text_edit()->set_auto_indent(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent"));
|
||||
shader_editor->get_text_edit()->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
|
||||
shader_editor->get_text_edit()->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
|
||||
shader_editor->get_text_edit()->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
|
||||
|
Loading…
Reference in New Issue
Block a user