Auto-complete substitutes in Stata

May 04, 2019

All the time when using the Stata command editor or console (or whatever you wanna call it) I find that I would want to be able to use some auto-complete command like you would in a normal terminal (like tab). That’s not possible however, but here are some other tips to assist with command entry and reduce overall typing effort:

  1. Command abbreviation: Try su instead of summarize or regr instead of regress.

  2. Command history: To the left of the main window there’s the command history. Similar to a terminal window you can use the up and down arrows to navigate. Double-clicking a command history entry executes the command in question (single-click just puts it in the console).

  3. Do-file editor: The built-in do-file editor is what you would normally use when doing any serious work in Stata. The do-file editor has some auto-indentation and syntax highlighting features that is helpful when working on large projects.

  4. Filename tab-completion: While there is no general auto-complete feature available, it is supported when it comes to file-endings. This might be useful when working with files, for instance with commands such as use, save, and log using.


Profile picture

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin

2024 © Johan Osterberg