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

[ScriptTool] Indentation : 4 spaces instead of 2

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      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");},

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: