Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-4773

Script editor indentation is non-standard and inconsistent



      Certain behavior in the Script Editor makes editing or viewing files in any other editor extremely messy and confusing.

      It comes down to indentation behavior.

      Standard indentation styles are:

      • indentation distance: 2 or 4 characters
      • character: spaces or a single tab
      • tab distance: 8 characters

      GMAT's Script Editor is configured as follows:

      • indentation distance: 3 characters
      • GUI indentation character: spaces
      • Editor indentation character: tab
      • tab distance: 3 characters

      This leads to the following situation:

      1. User saves script from GUI.
        1. Script is saved with 3-space indentation.
      2. User opens the script in the editor and adds a new line (say, in a For loop)
        1. New line automatically has a 1-tab indentation, with a tab distance that happens to be set at 3 characters
      3. User views the script in Notepad++, and now the indentation is messed up, because every editor has its own tab distance.

      In GMAT script editor:

      In Notepad++:

      In Vim:

      This may seem like a minor issue, but when sharing lengthy scripts among several people who use different editors, it becomes a readability issue.

      Proposed fix:

      • make GMAT editor indent consistently, either using spaces or tabs
      • set tab distance at standard distance (4 or 8 char)
      • set default indent at standard distance (2 or 4 char)

        Gliffy Diagrams


          1. gmat-editor.png
            7 kB
          2. notepad++.png
            9 kB
          3. vim.png
            9 kB


            There are no comments yet on this issue.


              • Assignee:
                jjkparker Joel Parker
                jjkparker Joel Parker
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: