Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do files which are written in Windows are not well aligned when being used under Linux

    Hi,

    I am using Stata MP 14 do-file editor, both on a Windows and Ubuntu Linux machine. The transition between the two setups works smoothly, except for the comments. Example:

    When I write the following do-file in Windows:

    Code:
    reg y1 = x1 x2              //Comment 1
    reg y2 = x1 x2              //Comment 2
    the comments are not aligned under Linux. The code looks frequently like this:

    Code:
    reg y1 = x1 x2              //Comment 1
    reg y2 = x1 x2                           //Comment 2
    Given that Stata uses UTF8 encoding on both types of machines, I found this issues quite confusing.

    While this might seem to be a minor issue, when writing rather complex code, things get pretty messy. Therefore, I am wondering if I can fix this issue somehow. Are there any settings that I might have overlooked? Are you aware of alternative editors (on Linux) that work well with code written in Windows?

    I am very grateful for your help!

  • #2
    Looks like a tab represents a different number of spaces between your systems. My guess would be that on your Windows machine it is represented by 4 spaces and on your Linux machine by 8 spaces. You can set the number of spaces per tab in the do-file editor by going to edit --> preferences at the bottom of the General tab there is a block called Indentation in which there is a field where you can specify the number of spaces per tab.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thanks so much! This was pretty easy. Now it is working!

      Comment

      Working...
      X