5/30/Aquamacs-for-Mac-Emacs-for-Windows/"> Emacs

How is Notepad++ better than STATA’s default do-file editor?

Notepad++ offers all the functionality of the STATA editor, and it allows for customization. Additionally, it includes productivity-enhancing functions such as ‘find and replace’, ‘move current line up/down’, ‘block commenting’, ‘record/play macro’, and more. You can also split windows to view two do-files side by side (right-click the tab and choose ‘move to other view’), or see one do-file in two split windows (right-click the tab and choose ‘clone to other view’) to view different sections without scrolling.

Here are some functions that I find useful (see this page for a full list of nice functions and corresponding hot keys):

Bottom line: if you’re a frequent STATA user but not a hardcore programmer (they have Vim and such), coding with Notepad++ will make you more efficient.

Notepad++ and STATA integration:

  1. Download the latest Notepad++ and install it.
  2. Set up hot keys to pass code from Notepad++ to STATA (like Ctrl-D in STATA’s editor).
  3. Set up syntax highlighting: it makes writing do-file more fun and reading it much easier. Below is a snapshot of how it looks. I suggest you download a ready-made syntax file (e.g., this one) and modify it according to your own liking.

Here are the steps:

You could also setup auto-completion and/or spell-check, but I think they’re a bit of an overkill (still, see Kranker’s page for more details).

Notepad++: for Windows users