stata+jedit
  1. Dowload this zip archive, and decompress it to your home/user folder. On Windows and Mac, that should be the folder CONTAINING the Desktop and My Documents folders.
  2. Get jEdit here.
  3. Install and run jEdit.
  4. From the Macros menu, Stata submenu, choose ~ setup-reset.
  5. Since some of the appearance options will not take effect until you quit and restart jEdit, you might as well do it now.

Ideally, that would be it.


However, this arrangement requires two lines in your profile.do file , so you'll need to check over the following:

  1. The ~setup-reset macro in jEdit will write the two lines to profile.do in your home/user folder. If that's where you keep your profile.do, or you haven't previously had a profile.do, then no problem. Otherwise, you'll need to copy the text from one file to the other, and then delete the extra file.
  2. The two commands might possibly interfere with something you've already set up —

    • One prefixes the main window title with . (a period).
    • The other adds an item to Stata's user menu, with the keyboard shortcut u.

    Those details are used in transferring control to Stata, and executing the code, respectively. Further changes to the main window title will not cause any problems, as long as the title always begins (or ends?) with ..

    If these bits seem too onerous, they could be changed to suit your preference by editing both profile.do and the vb file described on the platform specific page.


Windows Extra

The (otherwise excellent) fact that jEdit is java-based can cause some extra inconvenience. Below is a listing for a file that can update the Windows registry so that do-files, etc., will have jEdit icons, and open in jEdit when double-clicked. A couple of edits might be required to match this file to your own system.

To use the listing below:

  1. Copy it from this window, and paste it in jEdit
  2. Make sure the highlighted bits match the paths on your system

    • The first highlighted bit should be your home/user directory, as (way) above.
    • The second is the path to the Java executable
    • The third is the path to jEdit
    • The final bit is highlighted (gray) to, er, highlight the fact that an entry for .txt files is included, which would cause all your .txt files to be treated as jEdit files. You could delete that bit, or add more extensions.

  3. Save the file with the extension .vbs
  4. Double-click the file

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell. RegWrite "HKCU\Software\Classes\jEditFile\DefaultIcon\", "C:\Documents and Settings\XXXXX\.jedit\jfile.ico"
WshShell. RegWrite "HKCU\Software\Classes\jEditFile\Shell\Open\Command\", """C:\Program Files\Java\jre1.6.0_05\bin\javaw.exe"" -jar ""C:\Program Files\jEdit\jedit.jar"" -reuseview ""%1""" , "REG_EXPAND_SZ"
WshShell. RegWrite "HKCU\Software\Classes\.do\", "jEditFile"
WshShell. RegWrite "HKCU\Software\Classes\.ado\", "jEditFile"
WshShell. RegWrite "HKCU\Software\Classes\.mata\", "jEditFile"
WshShell. RegWrite "HKCU\Software\Classes\.txt\", "jEditFile"

set WshShell = Nothing