[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: doedit

From   "Eric A. Booth" <>
Subject   Re: st: doedit
Date   Fri, 27 Mar 2009 03:57:29 -0500

For your Mac 64/MP version, just type -doedit- and you will get a do- file editor window that is 'untitled'. You'll have to click the 'save' button to name it.

There are some alternatives that can be more useful:
You could create a read-only 'template' do-file in your pwd. You can then call this file up in the Stata do-file editor by typing -doedit template- . Alternatively, you could create an .ado file that calls up that template do-file whenever you type -template- (or whatever you want to call it). The reason should be read-only is so you'll never overwrite it (in Mac: Click the file in Finder, Press Command+i , check "Locked" ). The advantage of storing a read-only template is that you can preload sections and commands that you use frequently (such as setting the memory, matsize, or macros for certain sessions)


program define template
    di "Data Management Do-File Template `1'"
    cd "/applications/stata/data/"

A final alternative is to use fedit (found using -findit fedit-) so that you can call up your in a text editor of your choice:

*First, modify the fedit.ado file to recognize your text editor, for example for the alphaX text editor on Mac your fedit.ado file could read:


program define fedit
	version 8.0
	gettoken file options : 0, parse(",")
	qui findfile "`file'" `options'
	doedit "`r(fn)'"
        shell open -a "`r(fn)'"

*Next, call up your (avoid using the path() option by placing in your 'adopath') with the command:

fedit, path(/Applications/Stata/)


Eric A. Booth
Public Policy Research Institute
Texas A&M University
Office: +979.845.6754
Fax: +979.845.0249

On Mar 27, 2009, at 3:08 AM, Ulrich Kohler wrote:

Am Donnerstag, den 26.03.2009, 21:18 -0500 schrieb David Airey:

If I type


and doesn't exist, what is the behavior of Stata on Windows or

On the mac, Stata64/MP does nothing. I would have thought that is
should either give an error message saying the file could not be
found, or create

On Linux, the Do-File editor starts with a buffer called, but the
file is not actually created on the hard disk. The file is
created as soon as you hit the the save button in the tool bar.


030 25491-361

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index