Stata’s Do-file Editor has been written to make
programming tasks simpler than ever.
Among the features are
Syntax highlighting. Having command names, variables names, macro names,
strings, operators, and other program elements in different colors allows
you to spot syntax errors and bugs.
Code folding. Collapse code within
if/else, and other blocks of code.
Focus on the code you are currently writing or debugging and
hide everything else. In the Do-file Editor below, we know the
code in the two if blocks is good, so we have the code
folded—indicated by the plus signs inside the square boxes.
Clicking on those boxes expands the code, showing the hidden
Column-mode. Optionally select and edit columns of text.
Indentation guide. Display vertical lines at every tab stop to aid in
writing visually clean code.
Convert extended ASCII to Unicode. Specify character encoding of legacy
do-files so that any extended ASCII characters can be converted to the
right Unicode character.
Line bookmarks. Attach a bookmark to a line of code, and then quickly access
that line later by using its bookmark. Bookmarks are saved with do-files.New
Navigation Control.New Display a list of bookmarks and programs in a do-file, and
then select an item from the list to go directly to its line.
Auto-completion. Display a list of existing words in the current file
as well as Stata commands to auto-complete as you type.
Python, Markdown, JavaNew, and XMLNew support. Syntax highlighting support for Python, Markdown, JavaNew, and XMLNew files.
Indentation. Use spaces or tabs for indentation and convert between
the two methods of indentation.
Color themes (Windows and Mac). Includes support for dark mode as well
as the ability to modify the color for all text and GUI elements in
Brace matching. Manage complex, large blocks of code more easily.
Automatically insert matching characters for quotes and brackets as
Add/remove comments. Make a selection and add or remove comments (/*, */
Re-indent. Make a selection and re-indent your code to be properly aligned
and spaces are converted to tabs.
Tabbed windows. Open multiple files at the same time in different tabbed
Watch Enhancements to the Do-file Editor.
Watch Do-file Editor enhancements in Stata 17.
See all of the features in the Stata GUI.