Giter VIP home page Giter VIP logo

ado-mode's Introduction

The ado-mode for Emacs

The ado-mode is a major [editing] mode for Emacs which allows truly good editing of Stata, namely do, ado, sthlp, smcl, and mata files. Here is a screenshot to see what the highlighting does. The mode also handles indentation, date stamps, and includes templates for writing help files, project do-files and the like.

Emacs versions down to 24.3 are supported.

Here is the change log which says what is new.

The current version is 1.17.0.1, which is made for Stata 17. It works just fine with earlier versions of Stata, but it will highlight commands as though you were using Stata 17.

Here are the things which make life easier when using the ado-mode. Features include

  • Sending code directly from Emacs to Stata for evaluation. (See below)

  • Opening any file on the default ado-path, even automagically opening the ado-file for the current command.

  • Opening Stata help files (in Stata, of course) from Emacs.

  • Context-sensitive highlighting for keeping typos to a minimum.

    • Stata's commands and keywords are highlighted even if abbreviated.
    • Commands which need subcommands are highlighted differently, so that you know a subcommand is needed.
    • Downloaded and personal user-written commands can be automatically highlighted once Emacs knows where they are kept.
    • smcl directive highlighting (a big help for help files)
  • Templates for common files, such as do-files which keep their own logs, ado-files, do-files made for testing and debugging ado-files, and (most importantly, perhaps) Stata help files.

  • Automatic indentation so that long if, foreach, forvalues, and while blocks get closed. Many types of indentation styles are supported.

  • Making the name of the ado file match the name of the program defined, even if you change the program's name.

  • Automatic refreshing of a header time stamp which can be formatted in a variety of ways.

  • Typical Emacs things:

    • Parentheses, braces and double-quotes are balanced.
    • Auto-completion can be enabled via M-x auto-complete-mode or M-x company-mode, among other minor modes. Both highlight common words and words already used in the buffer being edited. auto-complete-mode comes with Emacs while company-mode can be downloaded from Melpa via M-x list-packages.

ado-mode can be downloaded via Melpa. I think. It's been accepted as a Melpa project, but the whole Melpa autoupdate thing throws me for a loop. So...

Manual installation is also possible, but takes more work. Take a look at the INSTALL.md file.

External Tools Needed for MS Windows and *nix:

  • To send code to Stata from Emacs:
    • If you are using a Mac, this will work out of the box.
    • If you are using MS Windows, you'll need to install of AutoIt.
    • If you are using Unix, you will need to get xsel and xdotool. In Debian/Ubuntu, this can be done via sudo apt-get install xsel xdotool. Other *nixes will be similar.

Please let me know if there are any troubles with the installations, since there are little quirks with cross-platform Emacs stuff.

ado-mode is on Twitter: @ado-mode. The real reason for this is to have an easy RSS feed for finding out about updates: https://twitter.com/adomode

ado-mode's People

Contributors

louabill avatar mclements avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.