Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3237

[ScriptTool] Indentation : 4 spaces instead of 2

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.0
    • 4.3.0
    • None
    • None

      Currently, when we write a script into the ScriptTool, the automatic indentation is set to 2 spaces, but we always use 4 spaces. I think this problem is already in other code editors of Ametys (using Ametys.form.field.Code).

      On the CodeMirror component, it seems there are options for this :

      indentUnit: 2,
      indentWithTabs: false,
      smartIndent: true,
      tabSize: 4,\
      

      Also, the tab key create a tab character but not spaces, maybe we can force it to spaces ? (But if we have 4 spaces for default indentation, perhaps it's useless)

      insertTab: function(cm {cm.replaceSelection("\t", "end");},

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: