My internet connection is extremely slow and therefore I execute batch files on the server without GUI, i.e. directly from the terminal. However, oftentimes I need to make a few changes in the code and a text editor highlighting Stata syntax would not hurt. Is there one?
Sublime Text editor has a package for Stata. If you're using mac you can find installation instructions here.
As linked by Maarten Buis, Nick Cox's list is the reference. It's a cool list, but it's badly outdated and therefore misses out the best parts of Stata support on Mac OS X. Here are some additions that also allude to the other answers.
Mac
TextMate has two Stata bundles, the Beatty bundle and the more recent Schumm bundle that uses a smarter approach to Stata syntax. (Note: not sure whether the Beatty bundle works under Stata 13; the Schumm bundle, which is the one you get through TextMate's bundle settings, does.)
Two other editors, Chocolat and Sublime Text, support TextMate bundles or ports of TextMate bundles. Phil Schumm's Stata bundle for TextMate is the most advanced and up-to-date solution that I know of, so I'd recommend that if you need an external editor.
TextWrangler also supports Stata through its own plugin system. I guess that BBEdit might therefore support it too, probably through slightly more awkward AppleScript calls. The only reason I see to use these instead of TextMate is if you are running an old system and/or are using these editors already.
If you need more alternatives, check out websites like Alternative To, I Use This, MacUpdate or VersionTracker for a larger choice of options. You'll find out that SubEthaEdit and Smultron (and probably its deceased fork, Fraise) support Stata, for instance.
tl;dr On Mac OS X, use TextMate with the Schumm bundle, and you will like it. (No idea if you can create GitHub issues through email, though!)
Win
Notepad++ has support, and there are mentions on Statalist of PFE, UltraEdit and WinEdt also having support. My guess is that you will find it more useful to get Sublime Text and use its Stata bundle port, unless again you are already using these editors.
tl;dr On both Mac OS X and Windows, Sublime Text with the Stata TextMate bundle port seem to work well.
As mentioned in another answer, Vim also offers support, and Emacs has an ado
major mode, plus some additional functions through ESS
(Emacs Speaks Statistics). Finally, if you are looking a Java cross-platform solution (but why would you?), jEdit supports Stata syntax.
If you want support for Stata colored syntax everywhere (e.g. on GitHub), you'll need to write a lexer for Stata and submit it to Pygments. I've asked a question about that. It does not look very difficult if you know enough Python (which I do not and regret).
HTH
Added: links, sections.
Unsurprisingly, Vim supports syntax highlighting for Stata out of the box. See http://www.vim.org/scripts/script.php?script_id=440 and this blog post: http://www.enoriver.net/stata/2010/02/26/i-switched-to-vim/
Similar to the other folks, my recommendations are Sublime Text and TextMate. They're my favorite editors on Windows and Mac, respectively. If you're a Mac user, I recommend TextMate (It's free, but Sublime Text is not).
You asked for a text editor, but if you also use any HTML editor, you can use Statax useful. (Here is the link to Statax, if it interests you).
This question was asked years ago, but I would like to add another option that is probably already known to more experienced Stata users. However, this may not be the case for new programmers who end up here, perhaps through a search engine, looking to find more information on the topic.
Visual Studio Code is a streamlined code editor, which offers a very flexible environment for programming. Once installed, one can obtain the necessary add-on package for Stata syntax highlighting from the Visual Studio Marketplace. It is regularly updated and the user can expand its functionality using extensions. As such, if someone is programming in more than one language, s/he can keep everything under one roof.
This solution addresses the OP's need to edit files remotely through its built-in Git support. Git is now pretty much the standard in version control. The idea behind it is that one does the work locally and then syncs the copy of the repository with the copy on the server.
Although this is not a command-line solution, i think it provides a great cross-platform development environment. And Git itself has proven to be very fast and reliable.
© 2022 - 2024 — McMap. All rights reserved.